summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG87
-rw-r--r--MAINTAINERS38
-rw-r--r--README440
-rw-r--r--README.md35
-rw-r--r--README.sources17
-rw-r--r--SECURITY.md6
-rw-r--r--classes/rmc-boot.bbclass17
-rw-r--r--classes/rmc-db.bbclass92
-rw-r--r--classes/uefi-comboapp.bbclass6
-rw-r--r--conf/include/maintainers.inc71
-rw-r--r--conf/layer.conf27
-rw-r--r--conf/machine/include/intel-common-pkgarch.inc26
-rw-r--r--conf/machine/include/intel-core2-32-common.inc4
-rw-r--r--conf/machine/include/intel-corei7-64-common.inc4
-rw-r--r--conf/machine/include/meta-intel.inc35
-rw-r--r--conf/machine/include/qemu-intel.inc2
-rw-r--r--conf/machine/include/qemuboot-intel.inc23
-rw-r--r--conf/machine/intel-core2-32.conf11
-rw-r--r--conf/machine/intel-corei7-64.conf20
-rw-r--r--conf/machine/intel-skylake-64.conf36
-rwxr-xr-xcustom-licenses/BSD_LMS30
-rw-r--r--custom-licenses/EULA392
-rw-r--r--custom-licenses/ISSL73
-rw-r--r--custom-licenses/Intel-Microcode-License160
-rw-r--r--custom-licenses/syrah32
-rw-r--r--documentation/building_and_booting.md134
-rw-r--r--documentation/dpcpp-compiler.md107
-rw-r--r--documentation/reporting_bugs.md22
-rw-r--r--documentation/rmc/README373
-rw-r--r--documentation/secureboot/README38
-rw-r--r--documentation/submitting_patches.md26
-rw-r--r--documentation/tested_hardware.md24
-rwxr-xr-xdynamic-layers/clang-layer/recipes-core/dnn/files/run-ptest15
-rw-r--r--dynamic-layers/clang-layer/recipes-core/dnn/onednn_3.4.bb57
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/allow-to-find-cpp-generation-tool.patch51
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/disable-werror.patch16
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/external-ocloc.patch40
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_24.05.28454.6.bb64
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-BiF-CMakeLists.txt-remove-opt-from-DEPENDS.patch35
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-external-SPIRV-Tools-change-path-to-tools-and-header.patch31
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-fix-tblgen.patch24
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/igc/files/0003-Improve-Reproducibility-for-src-package.patch34
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.15985.7.bb75
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0001-cl_headers-CMakeLists.txt-use-clang-from-native-sysr.patch49
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0002-Request-native-clang-only-when-cross-compiling-464.patch60
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang.inc34
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_14.0.0.bb5
-rw-r--r--dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_15.0.0.bb5
-rw-r--r--dynamic-layers/meta-python/recipes-opencv/dldt/openvino-model-optimizer_2024.0.0.bb33
-rw-r--r--dynamic-layers/openembedded-layer/recipes-bsp/amt/lms_2406.0.0.0.bb44
-rw-r--r--dynamic-layers/openembedded-layer/recipes-bsp/thermald/files/0001-Makefile-Fix-build-Issue.patch39
-rw-r--r--dynamic-layers/openembedded-layer/recipes-bsp/thermald/thermald_2.5.6.bb (renamed from recipes-bsp/thermald/thermald_1.7.1.bb)35
-rw-r--r--dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0001-Add-print-function-to-print-test-run-status-in-ptest.patch53
-rw-r--r--dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0001-Fix-QA-Issues.patch36
-rw-r--r--dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0002-cmake-don-t-build-for-32-bit-targets.patch52
-rw-r--r--dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/run-ptest2
-rw-r--r--dynamic-layers/openembedded-layer/recipes-core/ispc/ispc_1.23.0.bb64
-rw-r--r--dynamic-layers/openembedded-layer/recipes-core/levelzero/level-zero_1.15.8.bb33
-rw-r--r--dynamic-layers/openembedded-layer/recipes-oneapi/dpcpp-compiler/intel-oneapi-dpcpp-cpp-runtime_2024.0.0-49819.bb54
-rw-r--r--dynamic-layers/openembedded-layer/recipes-oneapi/dpcpp-compiler/intel-oneapi-dpcpp-cpp_2024.0.0-49819.bb45
-rw-r--r--dynamic-layers/openembedded-layer/recipes-oneapi/embree/embree_4.3.1.bb30
-rw-r--r--dynamic-layers/openembedded-layer/recipes-oneapi/ipp/intel-oneapi-ipp_2021.10.0-653.bb35
-rw-r--r--dynamic-layers/openembedded-layer/recipes-oneapi/mkl/intel-oneapi-mkl_2024.0.0-49656.bb74
-rw-r--r--dynamic-layers/openembedded-layer/recipes-oneapi/oidn/oidn_2.1.0.bb23
-rw-r--r--dynamic-layers/openembedded-layer/recipes-oneapi/openvkl/openvkl_2.0.1.bb42
-rw-r--r--dynamic-layers/openembedded-layer/recipes-oneapi/ospray/ospray/0001-Fix-GCC11-Compile-Error-in-benchmark_register.h.patch28
-rw-r--r--dynamic-layers/openembedded-layer/recipes-oneapi/ospray/ospray_3.1.0.bb37
-rw-r--r--dynamic-layers/openembedded-layer/recipes-oneapi/rkcommon/rkcommon_1.13.0.bb19
-rw-r--r--dynamic-layers/openembedded-layer/recipes-support/ipmctl/ipmctl/0001-CMakeLists-disable-Werror.patch38
-rw-r--r--dynamic-layers/openembedded-layer/recipes-support/ipmctl/ipmctl/0001-Ignore-STATIC_ASSERTs-and-NULL-define-for-os-and-ut-builds.patch59
-rw-r--r--dynamic-layers/openembedded-layer/recipes-support/ipmctl/ipmctl_03.00.00.0485.bb47
-rw-r--r--dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-CPU-Solving-the-build-failure-caused-by-setting-the-.patch43
-rw-r--r--dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-cmake-fix-build-when-using-sysroot.patch32
-rw-r--r--dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-cmake-yocto-specific-tweaks-to-the-build-process.patch90
-rw-r--r--dynamic-layers/openembedded-layer/recipes-support/opencv/files/0003-cmake-Fix-overloaded-virtual-error.patch33
-rw-r--r--dynamic-layers/openembedded-layer/recipes-support/opencv/files/0004-protobuf-allow-target-protoc-to-be-built.patch45
-rw-r--r--dynamic-layers/openembedded-layer/recipes-support/opencv/open-model-zoo/0001-use-oe-gflags.patch27
-rw-r--r--dynamic-layers/openembedded-layer/recipes-support/opencv/open-model-zoo_2024.0.0.bb54
-rw-r--r--dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2024.0.0.bb143
-rw-r--r--lib/oeqa/runtime/cases/cyclictest.py39
-rw-r--r--lib/oeqa/runtime/cases/dldt_inference_engine.py109
-rw-r--r--lib/oeqa/runtime/cases/dldt_model_optimizer.py38
-rw-r--r--lib/oeqa/runtime/cases/intel_mediasdk.py34
-rw-r--r--lib/oeqa/runtime/cases/intel_vaapi_driver.py27
-rw-r--r--lib/oeqa/runtime/cases/isal.py24
-rw-r--r--lib/oeqa/runtime/cases/libipt.py23
-rw-r--r--lib/oeqa/runtime/cases/libxcam.py37
-rw-r--r--lib/oeqa/runtime/cases/microcode.py31
-rw-r--r--lib/oeqa/runtime/cases/mkl_dnn.py67
-rw-r--r--lib/oeqa/runtime/cases/parselogs-ignores-intel-core2-32.txt9
-rw-r--r--lib/oeqa/runtime/cases/parselogs-ignores-intel-corei7-64.txt14
-rw-r--r--lib/oeqa/runtime/cases/thermald.py47
-rw-r--r--lib/oeqa/runtime/files/dldt-inference-engine/classification_sample.py135
-rw-r--r--lib/oeqa/runtime/miutils/dldtutils.py3
-rw-r--r--lib/oeqa/runtime/miutils/targets/oeqatarget.py11
-rw-r--r--lib/oeqa/runtime/miutils/tests/dldt_inference_engine_test.py56
-rw-r--r--lib/oeqa/runtime/miutils/tests/dldt_model_optimizer_test.py23
-rw-r--r--lib/oeqa/runtime/miutils/tests/mkl_dnn_test.py55
-rw-r--r--lib/oeqa/runtime/miutils/tests/squeezenet_model_download_test.py25
-rw-r--r--recipes-bsp/amt/files/atnetworktool-printf-fix.patch20
-rw-r--r--recipes-bsp/amt/files/readlink-declaration.patch18
-rw-r--r--recipes-bsp/amt/lms/0001-Include-sys-select.h-for-fd_set.patch28
-rw-r--r--recipes-bsp/amt/lms/0001-Protocol.cpp-Add-whitespace-for-gcc6-compile-error.patch31
-rw-r--r--recipes-bsp/amt/lms/0002-Use-proper-netinet-in.h-API.patch31
-rw-r--r--recipes-bsp/amt/lms/0003-Fix-device-file-referance-to-dev-mei0-remove-select.patch91
-rw-r--r--recipes-bsp/amt/lms/0004-Intel-AMT-ME-real-time-notification-infra.patch2647
-rw-r--r--recipes-bsp/amt/lms7_7.1.20.bb58
-rw-r--r--recipes-bsp/amt/lms8_8.0.0-7.bb46
-rw-r--r--recipes-bsp/formfactor/formfactor_0.0.bbappend2
-rw-r--r--recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf2
-rw-r--r--recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh15
-rw-r--r--recipes-bsp/gma500-gfx-check/gma500-gfx-check_1.0.bb18
-rw-r--r--recipes-bsp/intel-cmt-cat/intel-cmt-cat_23.11.1.bb29
-rw-r--r--recipes-bsp/metee/metee_3.2.4.bb18
-rw-r--r--recipes-bsp/rmc/boards/MinnowboardTurbot/KBOOTPARAM1
-rw-r--r--recipes-bsp/rmc/boards/MinnowboardTurbot/minnowboardturbot.fpbin154 -> 0 bytes
-rw-r--r--recipes-bsp/rmc/boards/NUC5i5RYB/BOOTENTRY.CONFIG2
-rw-r--r--recipes-bsp/rmc/boards/NUC5i5RYB/INSTALLER.CONFIG2
-rw-r--r--recipes-bsp/rmc/boards/NUC5i5RYB/POSTINSTALL.sh2
-rw-r--r--recipes-bsp/rmc/boards/NUC5i5RYB/boot.conf4
-rw-r--r--recipes-bsp/rmc/boards/NUC5i5RYB/install.conf4
-rw-r--r--recipes-bsp/rmc/boards/NUC5i5RYB/nuc5i5.fpbin149 -> 0 bytes
-rw-r--r--recipes-bsp/rmc/boards/T100-32bit/BOOTENTRY.CONFIG2
-rw-r--r--recipes-bsp/rmc/boards/T100-32bit/T100-32bit.fpbin116 -> 0 bytes
-rw-r--r--recipes-bsp/rmc/boards/T100-32bit/boot.conf4
-rw-r--r--recipes-bsp/rmc/boards/T100-32bit/install.conf4
-rw-r--r--recipes-bsp/rmc/boards/broxton-m/BOOTENTRY.CONFIG2
-rw-r--r--recipes-bsp/rmc/boards/broxton-m/INSTALLER.CONFIG3
-rw-r--r--recipes-bsp/rmc/boards/broxton-m/KBOOTPARAM1
-rw-r--r--recipes-bsp/rmc/boards/broxton-m/POSTINSTALL.sh2
-rwxr-xr-xrecipes-bsp/rmc/boards/broxton-m/bm-1F1.fpbin83 -> 0 bytes
-rwxr-xr-xrecipes-bsp/rmc/boards/broxton-m/bm.fpbin83 -> 0 bytes
-rw-r--r--recipes-bsp/rmc/boards/broxton-m/boot.conf4
-rw-r--r--recipes-bsp/rmc/boards/broxton-m/install.conf4
-rw-r--r--recipes-bsp/rmc/boards/broxton-m/joule-1F1.fpbin122 -> 0 bytes
-rw-r--r--recipes-bsp/rmc/boards/minnowmax/BOOTENTRY.CONFIG2
-rw-r--r--recipes-bsp/rmc/boards/minnowmax/boot.conf4
-rw-r--r--recipes-bsp/rmc/boards/minnowmax/install.conf4
-rw-r--r--recipes-bsp/rmc/boards/minnowmax/minnowmax.fpbin143 -> 0 bytes
-rw-r--r--recipes-bsp/rmc/boards/minnowmaxB3/BOOTENTRY.CONFIG2
-rw-r--r--recipes-bsp/rmc/boards/minnowmaxB3/boot.conf4
-rw-r--r--recipes-bsp/rmc/boards/minnowmaxB3/install.conf4
-rw-r--r--recipes-bsp/rmc/boards/minnowmaxB3/minnowmaxB3.fpbin148 -> 0 bytes
-rw-r--r--recipes-bsp/rmc/boards/mohonpeak/BOOTENTRY.CONFIG2
-rw-r--r--recipes-bsp/rmc/boards/mohonpeak/INSTALLER.CONFIG3
-rw-r--r--recipes-bsp/rmc/boards/mohonpeak/KBOOTPARAM1
-rw-r--r--recipes-bsp/rmc/boards/mohonpeak/POSTINSTALL.sh3
-rw-r--r--recipes-bsp/rmc/boards/mohonpeak/boot.conf4
-rw-r--r--recipes-bsp/rmc/boards/mohonpeak/install.conf4
-rw-r--r--recipes-bsp/rmc/boards/mohonpeak/mohonpeak.fpbin121 -> 0 bytes
-rw-r--r--recipes-bsp/rmc/boards/nucgen6/BOOTENTRY.CONFIG2
-rw-r--r--recipes-bsp/rmc/boards/nucgen6/INSTALLER.CONFIG6
-rw-r--r--recipes-bsp/rmc/boards/nucgen6/KBOOTPARAM1
-rw-r--r--recipes-bsp/rmc/boards/nucgen6/POSTINSTALL.sh7
-rw-r--r--recipes-bsp/rmc/boards/nucgen6/boot.conf4
-rw-r--r--recipes-bsp/rmc/boards/nucgen6/install.conf4
-rw-r--r--recipes-bsp/rmc/boards/nucgen6/mylib.conf7
-rw-r--r--recipes-bsp/rmc/boards/nucgen6/nuc6.fpbin149 -> 0 bytes
-rw-r--r--recipes-bsp/rmc/boards/qemu-2.6/KBOOTPARAM1
-rw-r--r--recipes-bsp/rmc/boards/qemu-2.6/qemu-2.6.fpbin113 -> 0 bytes
-rw-r--r--recipes-bsp/rmc/boards/qemu-2.8/KBOOTPARAM1
-rw-r--r--recipes-bsp/rmc/boards/qemu-2.8/qemu-2.8.fpbin113 -> 0 bytes
-rw-r--r--recipes-bsp/rmc/rmc-db.bb62
-rw-r--r--recipes-bsp/rmc/rmc-efi.bb40
-rw-r--r--recipes-bsp/rmc/rmc.bb46
-rw-r--r--recipes-bsp/systemd-boot/systemd-boot/0001-efi-boot.c-workaround-for-Joule-BIOS-hang.patch31
-rw-r--r--recipes-bsp/systemd-boot/systemd-boot/0001-partially-revert-sd-boot-stub-Obtain-PE-section-offs.patch46
-rw-r--r--recipes-bsp/systemd-boot/systemd-boot/0002-sd-boot-fix-RMC-compatibility-with-systemd-boot-and-.patch62
-rw-r--r--recipes-bsp/systemd-boot/systemd-boot/0003-sd-boot-Load-board-specific-boot-entries-from-RMC-da.patch252
-rw-r--r--recipes-bsp/systemd-boot/systemd-boot/0004-sd-boot-Support-global-kernel-command-line-fragment.patch67
-rw-r--r--recipes-bsp/systemd-boot/systemd-boot/0005-sd-boot-support-global-kernel-command-line-in-EFI-st.patch82
-rw-r--r--recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc30
-rw-r--r--recipes-bsp/systemd-boot/systemd-boot_%.bbappend18
-rw-r--r--recipes-bsp/thermald/files/0001-Include-poll.h-instead-of-sys-poll.h.patch36
-rw-r--r--recipes-bsp/thermald/files/0002-Use-correct-format-specifier-for-X32.patch87
-rw-r--r--recipes-core/images/core-image-minimal-initramfs.bbappend6
-rw-r--r--recipes-core/images/core-image-tiny.bb4
-rw-r--r--recipes-core/initrdscripts/files/intel-x86-common/init-install-efi.sh342
-rw-r--r--recipes-core/initrdscripts/initramfs-live-install-efi_%.bbappend2
-rw-r--r--recipes-core/libxcam/libxcam/0001-fake_v4l2_device.h-fix-narrowing-warning.patch94
-rw-r--r--recipes-core/libxcam/libxcam_1.5.0.bb39
-rw-r--r--recipes-core/meta/icx-environment.inc15
-rw-r--r--recipes-core/meta/meta-environment-extsdk.bbappend3
-rw-r--r--recipes-core/meta/meta-environment.bbappend3
-rw-r--r--recipes-core/microcode/intel-microcode_20240312.bb (renamed from recipes-core/microcode/intel-microcode_20180312.bb)36
-rw-r--r--recipes-core/microcode/iucode-tool_2.3.1.bb (renamed from recipes-core/microcode/iucode-tool_2.1.2.bb)12
-rw-r--r--recipes-core/ovmf/files/0001-ovmf-RefkitTestCA-TEST-UEFI-SecureBoot.patch200
-rw-r--r--recipes-core/ovmf/ovmf-shell-image-enrollkeys.bb4
-rw-r--r--recipes-core/ovmf/ovmf_%.bbappend6
-rw-r--r--recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend1
-rw-r--r--recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bbappend1
-rw-r--r--recipes-devtools/slimboot/slimboot-tools_git.bb22
-rw-r--r--recipes-graphics/gmmlib/files/0001-Add-new-DG2-device-IDs-194.patch37
-rw-r--r--recipes-graphics/gmmlib/files/0001-Introduce-ARL-H-support-172.patch42
-rw-r--r--recipes-graphics/gmmlib/gmmlib_22.3.15.bb27
-rw-r--r--recipes-graphics/hdcp/hdcp/0001-main-fix-hdcpd-service-failure.patch42
-rw-r--r--recipes-graphics/hdcp/hdcp_21.2.0.bb26
-rw-r--r--recipes-graphics/intel-gpu-tools/intel-gpu-tools_1.22.bb42
-rw-r--r--recipes-graphics/libva/libva-intel-utils_2.20.1.bb35
-rw-r--r--recipes-graphics/libva/libva-intel_2.20.0.bb55
-rw-r--r--recipes-graphics/metrics-discovery/metrics-discovery_1.12.170.bb18
-rw-r--r--recipes-graphics/xorg-driver/xf86-video-ast_1.1.6.bb (renamed from recipes-graphics/xorg-driver/xf86-video-ast_1.1.5.bb)4
-rw-r--r--recipes-kernel/cryptodev/cryptodev-module/0001-zc-Force-4.10-get_user_pages_remote-API.patch26
-rw-r--r--recipes-kernel/cryptodev/cryptodev-module_%.bbappend9
-rw-r--r--recipes-kernel/intel-ethernet/ixgbe/0001-ixgbe-skip-host-depmod.patch31
-rw-r--r--recipes-kernel/intel-ethernet/ixgbe_5.19.6.bb43
-rw-r--r--recipes-kernel/intel-ethernet/ixgbe_5.3.6.bb37
-rw-r--r--recipes-kernel/intel-ethernet/ixgbevf/0001-Makefile-check-for-CONFIG_IXGBEVF-instead.patch27
-rw-r--r--recipes-kernel/intel-ethernet/ixgbevf/0001-ixgbevf-skip-host-depmod.patch31
-rw-r--r--recipes-kernel/intel-ethernet/ixgbevf_4.18.7.bb (renamed from recipes-kernel/intel-ethernet/ixgbevf_4.3.5.bb)29
-rw-r--r--recipes-kernel/iwlwifi/backport-iwlwifi/0001-hrtimer-fix-version-numbers-because-production-kerne.patch87
-rw-r--r--recipes-kernel/iwlwifi/backport-iwlwifi_git.bb28
-rw-r--r--recipes-kernel/linux/linux-intel-rt_4.14.bb24
-rw-r--r--recipes-kernel/linux/linux-intel-rt_4.9.bb20
-rw-r--r--recipes-kernel/linux/linux-intel-rt_6.6.bb33
-rw-r--r--recipes-kernel/linux/linux-intel.inc20
-rw-r--r--recipes-kernel/linux/linux-intel/0001-lib-build_OID_registry-fix-reproducibility-issues.patch48
-rw-r--r--recipes-kernel/linux/linux-intel/0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch62
-rw-r--r--recipes-kernel/linux/linux-intel/0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-.patch52
-rw-r--r--recipes-kernel/linux/linux-intel/0001-perf-x86-32-explicitly-include-errno.h.patch41
-rw-r--r--recipes-kernel/linux/linux-intel/0001-vt-conmakehash-improve-reproducibility.patch58
-rw-r--r--recipes-kernel/linux/linux-intel/0002-mconf-fix-output-of-cflags-and-libraries.patch40
-rw-r--r--recipes-kernel/linux/linux-intel/disable_skylake_sound.cfg14
-rw-r--r--recipes-kernel/linux/linux-intel/fix-perf-reproducibility.patch39
-rw-r--r--recipes-kernel/linux/linux-intel_4.14.bb20
-rw-r--r--recipes-kernel/linux/linux-intel_4.9.bb16
-rw-r--r--recipes-kernel/linux/linux-intel_6.6.bb21
-rw-r--r--recipes-kernel/linux/linux-intel_6.8.bb20
-rw-r--r--recipes-kernel/linux/linux-yocto-dev.bbappend22
-rw-r--r--recipes-kernel/linux/linux-yocto-rt_%.bbappend (renamed from recipes-kernel/linux/linux-yocto-rt_4.12.bbappend)0
-rw-r--r--recipes-kernel/linux/linux-yocto-rt_4.14.bbappend1
-rw-r--r--recipes-kernel/linux/linux-yocto-rt_4.15.bbappend1
-rw-r--r--recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend15
-rw-r--r--recipes-kernel/linux/linux-yocto_%.bbappend4
-rw-r--r--recipes-kernel/linux/linux-yocto_4.12.bbappend1
-rw-r--r--recipes-kernel/linux/linux-yocto_4.14.bbappend1
-rw-r--r--recipes-kernel/linux/linux-yocto_4.15.bbappend1
-rw-r--r--recipes-kernel/linux/meta-intel-compat-kernel.inc11
-rw-r--r--recipes-kernel/lttng/lttng-modules/0002-lttng-modules-PKT-4.9-yocto-build-failed.patch38
-rw-r--r--recipes-kernel/lttng/lttng-modules_%.bbappend7
-rw-r--r--recipes-multimedia/itt/itt_3.24.6.bb39
-rw-r--r--recipes-multimedia/libva/files/0001-Disable-vp9-padding-on-mtl.patch35
-rw-r--r--recipes-multimedia/libva/files/0002-Force-ARGB-surface-to-tile4-for-ACM.patch44
-rw-r--r--recipes-multimedia/libva/files/0004-Add-device-ID-for-ARL.patch45
-rw-r--r--recipes-multimedia/libva/files/0005-Add-XR24-support-to-DMABuf.patch34
-rw-r--r--recipes-multimedia/libva/files/0006-add-INTEL-MEDIA-ALLOC-refineE-to-specify-the-memory-.patch214
-rw-r--r--recipes-multimedia/libva/files/0007-Skip-report-keys.patch78
-rw-r--r--recipes-multimedia/libva/files/0008-Limit-INTEL-MEDIA-ALLOC-MODE-to-MTL-and-ARL-only.patch255
-rw-r--r--recipes-multimedia/libva/files/0009-Skip-cache-bucket-realloc-for-default-mode-0.patch33
-rw-r--r--recipes-multimedia/libva/files/0010-Fix-failed-4k-video-wall-test-case-and-color-corrupt.patch195
-rw-r--r--recipes-multimedia/libva/files/0011-Disable-422H-format-output.patch33
-rw-r--r--recipes-multimedia/libva/files/0012-Decode-Fix-AVC-decode-SFC-4K-hang-issue.patch32
-rw-r--r--recipes-multimedia/libva/intel-media-driver_23.4.3.bb61
-rw-r--r--recipes-multimedia/libva/intel-vaapi-driver_2.4.1.bb (renamed from recipes-multimedia/libva/intel-vaapi-driver_2.1.0.bb)19
-rw-r--r--recipes-multimedia/libva/va-intel.bb32
-rw-r--r--recipes-multimedia/libyami/libyami-utils/0001-Fix-build-with-clang.patch99
-rw-r--r--recipes-multimedia/libyami/libyami-utils_1.3.0.bb31
-rw-r--r--recipes-multimedia/libyami/libyami/0001-Makefile.am-point-to-build-dir-for-generated-headers.patch29
-rw-r--r--recipes-multimedia/libyami/libyami/0001-bitWriter.cpp-Delete-unused-CACHEBYTES.patch27
-rw-r--r--recipes-multimedia/libyami/libyami/0002-typecast-index-from-size_t-to-int.patch42
-rw-r--r--recipes-multimedia/libyami/libyami/0003-Add-Wno-invalid-offsetof-to-compiler-commandline.patch29
-rw-r--r--recipes-multimedia/libyami/libyami/0004-Typecast-POWER32SUB2-to-uint8_t.patch33
-rw-r--r--recipes-multimedia/libyami/libyami/0005-move-c-definitions-out-of-extern-C-block.patch130
-rw-r--r--recipes-multimedia/libyami/libyami/0006-Avoid-namespace-conflicts-by-adding-explicit-using-n.patch41
-rw-r--r--recipes-multimedia/libyami/libyami/0007-Delete-unused-variables.patch36
-rw-r--r--recipes-multimedia/libyami/libyami/0008-NalUnit-is-declared-in-different-namespace.patch31
-rw-r--r--recipes-multimedia/libyami/libyami/0009-Fix-clang-warnings.patch37
-rw-r--r--recipes-multimedia/libyami/libyami_1.3.0.bb35
-rw-r--r--recipes-multimedia/mediasdk/files/0001-FindITT.cmake-fix-detection-of-header-library.patch49
-rw-r--r--recipes-multimedia/mediasdk/files/fix-gcc13.patch15
-rw-r--r--recipes-multimedia/mediasdk/intel-mediasdk_23.2.2.bb63
-rw-r--r--recipes-multimedia/onevpl/files/0001-ARLH-DID-open-source-6286.patch39
-rw-r--r--recipes-multimedia/onevpl/files/0001-Fix-SetBuffersYV12-V-U-plane-offsets-calculation-647.patch32
-rw-r--r--recipes-multimedia/onevpl/files/0001-JPEGe-Enable-BGR4-JPEG-Enc-support-6470.patch96
-rw-r--r--recipes-multimedia/onevpl/files/0001-vpl.pc.in-dont-pass-pcfiledir-to-cflags.patch28
-rw-r--r--recipes-multimedia/onevpl/onevpl-intel-gpu_23.4.3.bb33
-rw-r--r--recipes-multimedia/onevpl/onevpl_2023.4.0.bb40
-rw-r--r--recipes-oneapi/crypto/intel-crypto-mb/0001-CMakeLists.txt-exclude-host-system-headers.patch27
-rw-r--r--recipes-oneapi/crypto/intel-crypto-mb/0001-crypto-mb-Make-sure-libs-are-installed-correctly.patch42
-rw-r--r--recipes-oneapi/crypto/intel-crypto-mb/0002-cmake-exclude-Yocto-build-flags.patch45
-rw-r--r--recipes-oneapi/crypto/intel-crypto-mb_2021.11.1.bb28
-rw-r--r--recipes-oneapi/onedpl/onedpl_2022.3.0.bb26
-rw-r--r--recipes-oneapi/setup-oneapi-env/files/intel-oneapi-runtime.conf4
-rw-r--r--recipes-oneapi/setup-oneapi-env/setup-intel-oneapi-env_2023.0.0-25370.bb20
-rw-r--r--recipes-rt/images/core-image-rt-sdk.bb2
-rw-r--r--recipes-rt/images/core-image-rt.bb2
-rw-r--r--recipes-selftest/images/secureboot-selftest-image-unsigned.bb4
-rw-r--r--recipes-support/isa-l/isa-l_2.31.0.bb19
-rw-r--r--recipes-support/libipt/libipt_2.1.1.bb34
-rw-r--r--recipes-support/sbsigntool/sbsigntool-native_git.bb24
-rw-r--r--recipes-support/sbsigntool/sbsigntool/0001-configure-Fixup-build-dependencies-for-cross-compili.patch54
-rw-r--r--wic/grub-bootdisk-microcode.wks.in12
-rw-r--r--wic/image-installer.wks.in8
-rw-r--r--wic/systemd-bootdisk-microcode.wks.in (renamed from wic/systemd-bootdisk-microcode.wks)2
294 files changed, 6754 insertions, 7062 deletions
diff --git a/CHANGELOG b/CHANGELOG
deleted file mode 100644
index a99cbb1f..00000000
--- a/CHANGELOG
+++ /dev/null
@@ -1,87 +0,0 @@
1This file will only list major changes that occur within a release.
2For a full list of changes, view the git log of the repository.
3
4Rocko Release 11/2017
5=====================
6
7Moved qat support to separate layer
8-----------------------------------
9Quick Assist Technology (QAT) is more middleware and should not be part of the
10core BSP. The new layer can be found here:
11https://git.yoctoproject.org/cgit/cgit.cgi/meta-intel-qat/
12
13Moved dpdk support to separate layer
14------------------------------------
15We had some requests to make DPDK standalone so that it could be included
16without bringing in anything else from meta-intel, as it is not specific to
17Intel(R) hardware. The new layer is located here:
18https://git.yoctoproject.org/cgit/cgit.cgi/meta-dpdk/
19
20Added support for out-of-tree iwlwifi drivers
21---------------------------------------------
22Backport-iwlwifi out-of-tree wifi modules are now available via meta-intel.
23Backport-iwlwifi brings the latest iwlwifi drivers to almost any kernel
24Note that mac80211 and cfg80211 backports are also necessary, which will most
25likely cause incompatibility with other in-tree wifi drivers.
26See https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi for more info.
27
28Added support for out-of-tree ixgbe drivers
29-------------------------------------------
30The out-of-tree ixgbe drivers bring ixgbe support to nearly any kernel. See
31here: http://www.intel.com/network/connectivity/products/server_adapters.htm
32
33Added an implementation of Secure Boot
34--------------------------------------
35meta-intel now supports a simple Secure Boot implementation. This implementation
36consists of a single binary consisting of an EFI stub, the kernel, an
37initrd, and a kernel command line. The binary is then signed via keys defined by
38the variables SECUREBOOT_SIGNING_KEY and SECUREBOOT_SIGNING_CERT. These keys
39should match the keys embedded in your hardware's firmware.
40See documentation/secureboot/README for more information on this feature.
41
42Improved Yocto Project Compatibility status
43-------------------------------------------
44The common layer should now be considered Yocto Project compatible - it should
45no longer modify OE-core values when adding the layer to your bblayers.conf.
46The meta-tlk layer is still not Yocto Project compatible, however.
47
48Pyro Release 5/2017
49===================
50
51Changed default kernel provider from linux-yocto to linux-intel.
52----------------------------------------------------------------
53Linux-intel is an Intel(R)-maintained kernel based on the latest stable
54branch, along with backports from upstream to better support Intel(R)
55hardware. The intel-linux kernel also has a branch with the preempt-rt
56patches applied, providing a preempt-rt kernel with no additional work.
57
58Added QEMU support.
59-------------------
60We now build several virtio drivers into the kernel by default, and
61have qemuboot.conf files for intel-corei7-64 and intel-core2-32
62targets. This allows one to do basic testing on meta-intel images
63without having to use hardware. The virtio drivers are added via
64KERNEL_FEATURES_INTEL_COMMON. This prevents them from being added to
65custom kernels by default. They can be removed by adding the
66following to a conf or kernel bbappend file:
67 KERNEL_FEATURES_INTEL_COMMON_remove = “cfg/virtio.sccâ€
68OVMF firmware is also built and can be used in order to emulate a UEFI
69environment. A full runqemu command line for intel-corei7-64 could look
70like this:
71 runqemu core-image-minimal intel-corei7-64 wic ovmf
72
73Musl support
74------------
75Meta-intel is now compatible with the musl C library. You can specify musl
76As your C library by adding the following to your local.conf:
77 TCLIBC = “muslâ€
78Note: there is a known failure with DPDK.
79
80X32 support
81-----------
82The meta-intel layer can now build with the x32 tune settings in a multi-lib
83setting, it will not work in as the primary MACHINE tune as the bootloader needs
84to be built as a 64bit binary. The setup for this would be as follows:
85 require conf/multilib.conf
86 MULTILIBS = "multilib:libx32
87 DEFAULTTUNE_virtclass-multilib-libx32 = "corei7-64-x32"
diff --git a/MAINTAINERS b/MAINTAINERS
deleted file mode 100644
index 880481e8..00000000
--- a/MAINTAINERS
+++ /dev/null
@@ -1,38 +0,0 @@
1This file contains a list of BSP maintainers for the BSPs contained in
2the meta-intel repository.
3
4The purpose of this file is to provide contact information for
5specific BSPs and other code contained within meta-intel. You should
6address questions and patches for a particular BSP or other code to
7the appropriate maintainer listed in this file, cc'ing the meta-intel
8mailing list. This ensures that your question or patch will be
9addressed by the appropriate person, and that it will be seen by other
10users who may be facing similar problems or questions.
11
12Please see the top-level README file for guidelines relating to the
13details of submitting patches, reporting problems, or asking questions
14about any of the BSPs or other recipes contained within meta-intel.
15
16Descriptions of section entries:
17
18 M: Mail patches to: FullName <address@domain>
19 F: Files and directories with wildcard patterns.
20 A trailing slash includes all files and subdirectory files.
21 F: common/ all files in and below common
22 F: common/* all files in common, but not below
23 One pattern per line. Multiple F: lines acceptable.
24
25Please keep this list in alphabetical order.
26
27Maintainers List (try to look for most precise areas first)
28
29 -----------------------------------
30
31M: California Sullivan <california.l.sullivan@intel.com>
32F: *
33
34M: Juro Bystricky <juro.bystricky@intel.com>
35F: *
36
37M: Anuj Mittal <anuj.mittal@intel.com>
38F: *
diff --git a/README b/README
deleted file mode 100644
index 0977e798..00000000
--- a/README
+++ /dev/null
@@ -1,440 +0,0 @@
1meta-intel
2==========
3
4This README file contains information on building and booting
5meta-intel BSP layers. Please see the corresponding sections below
6for details.
7
8
9Yocto Project Compatible
10========================
11
12The BSPs contained in this layer are compatible with the Yocto Project
13as per the requirements listed here:
14
15 https://www.yoctoproject.org/webform/yocto-project-compatible-registration
16
17
18Dependencies
19============
20
21This layer depends on:
22
23 URI: git://git.openembedded.org/bitbake
24 branch: 1.38
25
26 URI: git://git.openembedded.org/openembedded-core
27 layers: meta
28 branch: sumo
29
30
31Table of Contents
32=================
33
34 I. Overview
35 II. Building and booting meta-intel BSP layers
36 a. Building the intel-common BSP layers
37 b. Booting the intel-common BSP images
38 III. Technical Miscellany
39 Benefits of using meta-intel
40 The intel-common kernel package architecture
41 Intel-specific machine features
42 IV. Tested Hardware
43 V. Guidelines for submitting patches
44
45
46I. Overview
47===========
48
49This is the location for Intel-maintained BSPs.
50
51For details on the intel-common, see the information below.
52
53For all others, please see the README files contained in the
54individual BSP layers for BSP-specific information.
55
56If you have problems with or questions about a particular BSP, please
57contact the maintainer listed in the MAINTAINERS file directly (cc:ing
58the Yocto mailing list puts it in the archive and helps other people
59who might have the same questions in the future), but please try to do
60the following first:
61
62 - look in the Yocto Project Bugzilla
63 (http://bugzilla.yoctoproject.org/) to see if a problem has
64 already been reported
65
66 - look through recent entries of the meta-intel
67 (https://lists.yoctoproject.org/pipermail/meta-intel/) and Yocto
68 (https://lists.yoctoproject.org/pipermail/yocto/) mailing list
69 archives to see if other people have run into similar problems or
70 had similar questions answered.
71
72If you believe you have encountered a bug, you can open a new bug and
73enter the details in the Yocto Project Bugzilla
74(http://bugzilla.yoctoproject.org/). If you're relatively certain
75that it's a bug against the BSP itself, please use the 'Yocto Project
76Components: BSPs | meta-intel' category for the bug; otherwise, please
77submit the bug against the most likely category for the problem - if
78you're wrong, it's not a big deal and the bug will be recategorized
79upon triage.
80
81
82II. Building and booting meta-intel BSP layers
83==============================================
84
85The following sections contain information on building and booting the
86BSPs contained in the meta-intel layer.
87
88Note that these instructions specifically cover the intel-common, which
89may or may not be applicable to other BSPs contained in this layer - if
90a given BSP contains its own README, that version should be used instead,
91and these instructions can be ignored.
92
93a. Building the intel-common BSP layers
94-------------------------------------------------
95
96In order to build an image with BSP support for a given release, you
97need to download the corresponding BSP tarball from the 'Board Support
98Package (BSP) Downloads' page of the Yocto Project website (or
99equivalently, check out the appropriate branch from the meta-intel git
100repository, see below). For the intel-common BSPs, those tarballs would
101correspond to the following choices in the BSP downloads section:
102
103 - Intel-core2-32 Intel® Common Core BSP (Intel-core2-32)
104 - Intel-corei7-64 Intel® Common Core BSP (Intel-corei7-64)
105
106The intel-* BSPs, also known as the intel-common BSPs, provide a few
107carefully selected tune options and generic hardware support to cover
108the majority of current Intel CPUs and devices. The naming follows the
109convention of intel-<TUNE>-<BITS>, where TUNE is the gcc cpu-type
110(used with mtune and march typically) and BITS is either 32 bit or 64
111bit.
112
113Having done that, and assuming you extracted the BSP tarball contents
114at the top-level of your yocto build tree, you can build a BSP image
115by adding the location of the meta-intel layer to bblayers.conf e.g.:
116
117 yocto/meta-intel \
118
119To enable a particular machine, you need to add a MACHINE line naming
120the BSP to the local.conf file:
121
122 MACHINE ?= "xxx"
123
124where 'xxx' is replaced by one of the following BSP names:
125
126 - intel-core2-32
127
128 This BSP is optimized for the Core2 family of CPUs as well as all
129 Atom CPUs prior to the Silvermont core.
130
131 - intel-corei7-64
132
133 This BSP is optimized for Nehalem and later Core and Xeon CPUs as
134 well as Silvermont and later Atom CPUs, such as the Baytrail SoCs.
135
136You should then be able to build an image as such:
137
138 $ source oe-init-build-env
139 $ bitbake core-image-sato
140
141At the end of a successful build, you should have an image that
142you can boot from a USB flash drive (see instructions on how to do
143that below, in the section 'Booting the intel-common BSP images').
144
145As an alternative to downloading the BSP tarball, you can also work
146directly from the meta-intel git repository. For each BSP in the
147'meta-intel' repository, there are multiple branches, one
148corresponding to each major release starting with 'laverne' (0.90), in
149addition to the latest code which tracks the current master (note that
150not all BSPs are present in every release). Instead of extracting
151a BSP tarball at the top level of your yocto build tree, you can
152equivalently check out the appropriate branch from the meta-intel
153repository at the same location.
154
155b. Booting the intel-common BSP images
156--------------------------------------
157
158If you downloaded the BSP tarball, you will find bootable images in
159the /binary directory. If you've built your own image, either from
160the downloaded BSP layer or from the meta-intel git repository, you'll
161find the bootable image in the build/tmp/deploy/images/xxx directory,
162where again 'xxx' refers to the machine name used in the build.
163
164The BSP /binary directory or build contains bootable live images,
165which can be used to directly boot Yocto off of a USB flash drive.
166
167Under Linux, insert a USB flash drive. Assuming the USB flash drive
168takes device /dev/sdf, use dd to copy the image to it. Before the image
169can be burned onto a USB drive, it should be un-mounted. Some Linux distros
170may automatically mount a USB drive when it is plugged in. Using USB device
171/dev/sdf as an example, find all mounted partitions:
172
173 $ mount | grep sdf
174
175and un-mount those that are mounted, for example:
176
177 $ umount /dev/sdf1
178 $ umount /dev/sdf2
179
180Now burn the image onto the USB drive:
181
182 $ sudo dd if=core-image-sato-intel-corei7-64.wic of=/dev/sdf status=progress
183 $ sync
184 $ eject /dev/sdf
185
186This should give you a bootable USB flash device. Insert the device
187into a bootable USB socket on the target, and power on. This should
188result in a system booted to the Sato graphical desktop.
189
190If you want a terminal, use the arrows at the top of the UI to move to
191different pages of available applications, one of which is named
192'Terminal'. Clicking that should give you a root terminal.
193
194If you want to ssh into the system, you can use the root terminal to
195ifconfig the IP address and use that to ssh in. The root password is
196empty, so to log in type 'root' for the user name and hit 'Enter' at
197the Password prompt: and you should be in.
198
199If you find you're getting corrupt images on the USB (it doesn't show
200the syslinux boot: prompt, or the boot: prompt contains strange
201characters), try doing this first:
202
203 $ dd if=/dev/zero of=/dev/sdf bs=1M count=512
204
205III. Technical Miscellany
206=========================
207
208Benefits of using meta-intel
209----------------------------
210
211Using meta-intel has the following benefits over a generic BSP:
212
213tune flags
214++++++++++
215intel-* MACHINEs each have different compilation flags appropriate for their
216targeted hardware sets. intel-corei7-64 has tune flags appropriate for modern
21764-bit Intel Core i microarchitecture, and includes instruction sets up to
218SSE4.2. intel-core2-32 has tune flags appropriate for legacy 32-bit Intel Core2
219microarchitecture, and includes instruction sets up to SSE3.
220
221linux-intel kernel
222++++++++++++++++++
223The linux-intel kernel is an initiative to bring better Intel(R) hardware
224support to the current LTS linux kernel. It contains a base LTS kernel with
225additional backports from upstream Intel drivers. In addition, a default kernel
226config containing most features found on Intel boards is supplied via the
227yocto-kernel-cache.
228
229graphics stack
230++++++++++++++
231Meta-intel provides the latest Intel Graphics Linux Stack drivers to support
232Intel hardware as defined by the https://01.org/linuxgraphics.
233
234Other software
235++++++++++++++
236 * intel ucode - provides the latest microcode updates for Intel processors
237
238 * thermald - which proactively controls thermal, using P-states, T-states, and
239the Intel power clamp driver.
240(https://01.org/linux-thermal-daemon/documentation/introduction-thermal-daemon)
241
242 * RMC - Runtime Machine Configuration, which allows the bootload to determine
243board and CPU information in order to set specific kernel command line
244information at startup.
245
246The intel-common kernel package architecture
247--------------------------------------------
248
249These BSPs use what we call the intel-common Linux kernel package
250architecture. This includes core2-32-intel-common and
251corei7-64-intel-common. These kernel packages can also be used by any
252of the BSPs in meta-intel that choose to include the
253intel-common-pkgarch.inc file.
254
255To minimize the proliferation of vendor trees, reduce the sources we
256must support, and consolidate QA efforts, all BSP maintainers are
257encouraged to make use of the intel-common Linux kernel package
258architecture.
259
260Intel-specific machine features
261-------------------------------
262
263The meta-intel layer makes some additional machine features available
264to BSPs. These machine features can be used in a BSP layer in the
265same way that machine features are used in other layers based on
266oe-core, via the MACHINE_FEATURES variable.
267
268Requirements
269++++++++++++
270
271The meta-intel-specific machine features are only available to a BSP
272when the meta-intel layer is included in the build configuration, and
273the meta-intel.inc file is included in the machine configuration of
274that BSP.
275
276To make these features available for your machine, you will need to:
277
278 1. include a configuration line such as the below in bblayers.conf
279 BBLAYERS += "<local path>/meta-intel"
280 2. include the following line in the machine configuration file
281 require conf/machine/include/meta-intel.inc
282
283Once the above requirements are met, the machine features provided by
284the meta-intel layer will be available for the BSP to use.
285
286Available machine features
287++++++++++++++++++++++++++
288
289Currently, the meta-intel layer makes the following set of
290Intel-specific machine features available:
291
292 * intel-ucode
293
294These machine features can be included by listing them in the
295MACHINE_FEATURES variable in the machine configuration file. For
296example:
297
298 MACHINE_FEATURES += "intel-ucode"
299
300Machine feature details
301+++++++++++++++++++++++
302
303 * intel-ucode
304
305 This feature provides support for microcode updates to Intel
306 processors. The intel-ucode feature runs at early boot and uses
307 the microcode data file added by the feature into the BSP's
308 initrd. It also puts the userland microcode-updating tool,
309 iucode_tool, into the target images along with the microcode data
310 file.
311
312 Q. Why might a user want to enable the intel-ucode feature?
313
314 A. Intel releases microcode updates to correct processor behavior
315 as documented in the respective processor specification
316 updates. While the normal approach to getting such microcode
317 updates is via a BIOS upgrade, this can be an administrative
318 hassle and not always possible in the field. The intel-ucode
319 feature enables the microcode update capability present in the
320 Linux kernel. It provides an easy path for upgrading processor
321 microcode without the need to change the BIOS. If the feature
322 is enabled, it is also possible to update the existing target
323 images with a newer microcode update in the future.
324
325 Q. How would a user bundle only target-specific microcode in the
326 target image?
327
328 A. The Intel microcode data file released by Intel contains
329 microcode updates for multiple processors. If the BSP image is
330 meant to run on only a certain subset of processor types, a
331 processor-specific subset of microcode can be bundled into the
332 target image via the UCODE_FILTER_PARAMETERS variable. This
333 works by listing a sequence of iucode-tool parameters in the
334 UCODE_FILTER_PARAMETERS variable, which in this case will
335 select only the specific microcode relevant to the BSP. For
336 more information on the underlying parameters refer to the
337 iucode-tool manual page at http://manned.org/iucode-tool
338
339 To define a set of parameters for microcode-filtering via the
340 UCODE_FILTER_PARAMETERS variable, one needs to identify the
341 cpuid signatures of all the processors the BSP is meant to run
342 on. One way to determine the cpuid signature for a specific
343 processor is to build and run an intel-ucode-feature-enabled
344 image on the target hardware, without first assigning any value
345 to the UCODE_FILTER_PARAMETERS variable, and then once the
346 image is booted, run the "ucode_tool -S" command to have the
347 ucode tool scan the system for processor signatures. These
348 signatures can then be used in the UCODE_FILTER_PARAMETERS
349 variable in conjunction with -s parameter. For example, for
350 the fri2 BSP, the cpuid can be determined as such:
351
352 [root@fri2 ~]# iucode_tool -S
353 iucode_tool: system has processor(s) with signature 0x00020661
354
355 Given that output, a suitable UCODE_FILTER_PARAMETERS variable
356 definition could be specified in the machine configuration as
357 such:
358
359 UCODE_FILTER_PARAMETERS = "-s 0x00020661"
360
361 Q. Are there any reasons a user might want to disable the
362 intel-ucode feature?
363
364 A. The microcode data file and associated tools occupy a small
365 amount of space (a few KB) on the target image. BSPs which are
366 highly sensitive to target image size and which are not
367 experiencing microcode-related issues might consider not
368 enabling this feature.
369
370
371IV. Tested Hardware
372===================
373
374The following undergo regular basic testing with their respective MACHINE types.
375Note that both 64-bit and 32-bit firmware is available for the MinnowBoard
376Turbot, so it is tested against both intel-corei7-64 and intel-core2-32.
377
378intel-corei7-64:
379 NUC6i5SYH
380 MinnowBoard Turbot
381
382intel-core2-32:
383 MinnowBoard Turbot
384
385
386V. Guidelines for submitting patches
387====================================
388
389Please submit any patches against meta-intel BSPs to the meta-intel
390mailing list (meta-intel@yoctoproject.org). Also, if your patches are
391available via a public git repository, please also include a URL to
392the repo and branch containing your patches as that makes it easier
393for maintainers to grab and test your patches.
394
395There are patch submission scripts available that will, among other
396things, automatically include the repo URL and branch as mentioned.
397Please see the Yocto Project Development Manual sections entitled
398'Using Scripts to Push a Change Upstream and Request a Pull' and
399'Using Email to Submit a Patch' for details.
400
401Regardless of how you submit a patch or patchset, the patches should
402at minimum follow the suggestions outlined in the 'Submitting a Change
403to the Yocto Project' section in the Yocto Project Development Manual.
404Specifically, they should:
405
406 - Include a 'Signed-off-by:' line. A commit can't legally be pulled
407 in without this.
408
409 - Provide a single-line, short summary of the change. This short
410 description should be prefixed by the BSP or recipe name, as
411 appropriate, followed by a colon. Capitalize the first character
412 of the summary (following the colon).
413
414 - For the body of the commit message, provide detailed information
415 that describes what you changed, why you made the change, and the
416 approach you used.
417
418 - If the change addresses a specific bug or issue that is associated
419 with a bug-tracking ID, include a reference to that ID in your
420 detailed description in the following format: [YOCTO #<bug-id>].
421
422 - Pay attention to line length - please don't allow any particular
423 line in the commit message to stretch past 72 characters.
424
425 - For any non-trivial patch, provide information about how you
426 tested the patch, and for any non-trivial or non-obvious testing
427 setup, provide details of that setup.
428
429Doing a quick 'git log' in meta-intel will provide you with many
430examples of good example commits if you have questions about any
431aspect of the preferred format.
432
433The meta-intel maintainers will do their best to review and/or pull in
434a patch or patchset within 24 hours of the time it was posted. For
435larger and/or more involved patches and patchsets, the review process
436may take longer.
437
438Please see the meta-intel/MAINTAINERS file for the list of maintainers
439and their specific areas; it's also a good idea to cc: the specific
440maintainer, if applicable.
diff --git a/README.md b/README.md
new file mode 100644
index 00000000..3ec3992b
--- /dev/null
+++ b/README.md
@@ -0,0 +1,35 @@
1# meta-intel
2
3OpenEmbedded/Yocto BSP layer for Intel platforms.
4
5## Dependencies
6
7This layer primarily depends on OpenEmbedded-Core (OE-Core). However, certain
8recipes may require additional layers to support optional features or
9programming languages not supported by OE-Core. Such recipes are located within
10the `dynamic-layers` directory.
11
12Base dependencies:
13- [Bitbake](https://git.openembedded.org/bitbake)
14- [OE-Core](https://git.openembedded.org/openembedded-core)
15
16Dynamic additional dependencies:
17
18- [meta-openembedded](https://git.openembedded.org/meta-openembedded/tree/meta-oe)
19- [meta-python](https://git.openembedded.org/meta-openembedded/tree/meta-python)
20- [meta-clang](https://github.com/kraj/meta-clang.git)
21
22
23## Contents
24
25- [Building and booting meta-intel BSP layers](documentation/building_and_booting.md)
26- [Intel oneAPI DPC++/C++ Compiler](documentation/dpcpp-compiler.md)
27- [Tested Hardware](documentation/tested_hardware.md)
28- [Guidelines for submitting patches](documentation/submitting_patches.md)
29- [Reporting bugs](documentation/reporting_bugs.md)
30- [Reporting security bugs](SECURITY.md)
31
32## Maintainers
33
34- Anuj Mittal <anuj.mittal@intel.com>
35
diff --git a/README.sources b/README.sources
deleted file mode 100644
index ab71eb2b..00000000
--- a/README.sources
+++ /dev/null
@@ -1,17 +0,0 @@
1The sources for the packages comprising the images shipped with this
2BSP can be found at the following location:
3
4http://downloads.yoctoproject.org/mirror/sources/
5
6The metadata used to generate the images shipped with this BSP, in
7addition to the code contained in this BSP, can be found at the
8following location:
9
10http://downloads.yoctoproject.org/releases/yocto/yocto-2.5/poky-sumo-19.0.0.tar.bz2
11
12The metadata used to generate the images shipped with this BSP, in
13addition to the code contained in this BSP, can also be found at the
14following locations:
15
16git://git.yoctoproject.org/poky.git
17git://git.yoctoproject.org/meta-intel
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 00000000..e70fcb0f
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,6 @@
1# Security Policy
2Intel is committed to rapidly addressing security vulnerabilities affecting our customers and providing clear guidance on the solution, impact, severity and mitigation.
3
4## Reporting a Vulnerability
5Please report any security vulnerabilities in this project [utilizing the guidelines here](https://www.intel.com/content/www/us/en/security-center/vulnerability-handling-guidelines.html).
6
diff --git a/classes/rmc-boot.bbclass b/classes/rmc-boot.bbclass
deleted file mode 100644
index 37c3e30c..00000000
--- a/classes/rmc-boot.bbclass
+++ /dev/null
@@ -1,17 +0,0 @@
1# rmc-boot bbclass
2# Deploy central RMC database file to ESP
3
4IMAGE_INSTALL_append = " rmc"
5RMC_BOOTLOADER ?= "systemd-boot"
6
7inherit ${RMC_BOOTLOADER}
8
9do_bootimg[depends] += "${MLPREFIX}rmc-db:do_deploy"
10
11efi_populate_append() {
12 if [ -f ${DEPLOY_DIR_IMAGE}/rmc.db ]; then
13 install -m 0400 ${DEPLOY_DIR_IMAGE}/rmc.db ${DEST}/rmc.db
14 else
15 rm -f ${DEST}/rmc.db
16 fi
17}
diff --git a/classes/rmc-db.bbclass b/classes/rmc-db.bbclass
deleted file mode 100644
index 72594d69..00000000
--- a/classes/rmc-db.bbclass
+++ /dev/null
@@ -1,92 +0,0 @@
1# RMC database bbclass
2# provide functions to generate RMC database file on build host (native)
3
4DEPENDS += "rmc-native"
5
6# rmc_generate_db()
7# $1: a list of directories. Each directory holds directories for a group of
8# boards.
9# $2: path_name of rmc generates database file and records
10#
11# WARNING: content of directory of database file will be removed.
12#
13# Each board directory shall contain a fingerprint file (*.fp) at least, with
14# optional file blob(s) associated to the type of board. If a board directory
15# has no file blob, no record is created for that board.
16#
17# An example of two directories each of which contains two boards for RMC:
18# (All file and directory names are for illustration purpose.)
19#
20# dir_1/
21# board_1/
22# board_1_fingerprint.fp
23# file_1.blob
24# board_2/
25# board_2.fp
26# dir_2/
27# board_3/
28# b3.fp
29# file_1.blob
30# file_2.conf
31# board_4/
32# board_foo.fp
33# mylib.config
34#
35# To generate a RMC database "rmc.db" with data of all (actually 3) of boards in
36# a directory "deploy_dir":
37#
38# rmc_generate_db "dir_1 dir_2" "deploy_dir/rmc.db"
39#
40# The board_2 will be skipped. No record or any data for it is packed in
41# generated database because it only contains a fingerprint file.
42#
43
44rmc_generate_db () {
45 RMC_BOARD_DIRS=$1
46
47 if [ "$#" -ne 2 ]; then
48 echo "rmc_generate_db(): Wrong number of arguments: $#"
49 return 1
50 fi
51
52 RMC_DB_DIR=$(dirname "$2")
53 RMC_RECORDS=""
54
55 rm -rf ${RMC_DB_DIR}
56 mkdir -p ${RMC_DB_DIR}
57
58 # generate rmc database
59 for topdir in ${RMC_BOARD_DIRS}; do
60 # For all board dirs in a topdir:
61 CUR_BOARD_DIRS=$(find ${topdir}/* -type d)
62 for board_dir in ${CUR_BOARD_DIRS}; do
63 CUR_FINGERPRINT=$(find ${board_dir}/ -name "*.fp")
64
65 # disallow a board directory without any fingerprint file in it.
66 if [ -z "${CUR_FINGERPRINT}" ]; then
67 echo "Cannot find RMC fingerprint file in ${board_dir}"
68 return 1
69 fi
70
71 CUR_FILES=$(find ${board_dir}/ -type f |grep -v '\.fp$' || true)
72
73 # allow a directory only with fingerprint file. Developer may
74 # check in fingerprint for future use.
75 if [ -z "${CUR_FILES}" ]; then
76 continue
77 fi
78
79 for fp in ${CUR_FINGERPRINT}; do
80 fullname=$(basename ${fp})
81 CUR_TAG="${fullname%.*}"
82 CUR_RECORD=${RMC_DB_DIR}/${CUR_TAG}.rec
83 rmc -R -f ${fp} -b ${CUR_FILES} -o ${CUR_RECORD}
84 RMC_RECORDS="${RMC_RECORDS} ${CUR_RECORD}"
85 done
86 done
87 done
88
89 if [ ! -z "${RMC_RECORDS}" ]; then
90 rmc -D ${RMC_RECORDS} -o "$2"
91 fi
92}
diff --git a/classes/uefi-comboapp.bbclass b/classes/uefi-comboapp.bbclass
index 4ecc5535..a05e0ca0 100644
--- a/classes/uefi-comboapp.bbclass
+++ b/classes/uefi-comboapp.bbclass
@@ -4,8 +4,8 @@
4# it with the efi stub obtained from systemd-boot. 4# it with the efi stub obtained from systemd-boot.
5 5
6# Don't add syslinux or build an ISO 6# Don't add syslinux or build an ISO
7PCBIOS_forcevariable = "0" 7PCBIOS:forcevariable = "0"
8NOISO_forcevariable = "1" 8NOISO:forcevariable = "1"
9 9
10# image-live.bbclass will default INITRD_LIVE to the image INITRD_IMAGE creates. 10# image-live.bbclass will default INITRD_LIVE to the image INITRD_IMAGE creates.
11# We want behavior to be consistent whether or not "live" is in IMAGE_FSTYPES, so 11# We want behavior to be consistent whether or not "live" is in IMAGE_FSTYPES, so
@@ -138,7 +138,7 @@ build_efi_cfg() {
138 : 138 :
139} 139}
140 140
141populate_kernel_append() { 141populate_kernel:append() {
142 # The kernel and initrd are built into the app, so we don't need these 142 # The kernel and initrd are built into the app, so we don't need these
143 if [ -f $dest/initrd ]; then 143 if [ -f $dest/initrd ]; then
144 rm $dest/initrd 144 rm $dest/initrd
diff --git a/conf/include/maintainers.inc b/conf/include/maintainers.inc
index d37ddb5e..9849d0d8 100644
--- a/conf/include/maintainers.inc
+++ b/conf/include/maintainers.inc
@@ -1,21 +1,54 @@
1# This file contains a list of recipe maintainers for meta-intel 1# This file contains a list of recipe maintainers for meta-intel
2 2
3RECIPE_MAINTAINER_pn-core-image-rt = "Stephano Cetola <stephano.cetola@linux.intel.com>" 3RECIPE_MAINTAINER:pn-backport-iwlwifi = "Naveen Saini <naveen.kumar.saini@intel.com>"
4RECIPE_MAINTAINER_pn-core-image-rt-sdk = "Stephano Cetola <stephano.cetola@linux.intel.com>" 4RECIPE_MAINTAINER:pn-core-image-rt = "Anuj Mittal <anuj.mittal@intel.com>"
5RECIPE_MAINTAINER_pn-gma500-gfx-check = "Anuj Mittal <anuj.mittal@intel.com>" 5RECIPE_MAINTAINER:pn-core-image-rt-sdk = "Anuj Mittal <anuj.mittal@intel.com>"
6RECIPE_MAINTAINER_pn-intel-gpu-tools = "Anuj Mittal <anuj.mittal@intel.com>" 6RECIPE_MAINTAINER:pn-core-image-tiny = "Naveen Saini <naveen.kumar.saini@intel.com>"
7RECIPE_MAINTAINER_pn-intel-microcode = "California Sullivan <california.l.sullivan@intel.com>" 7RECIPE_MAINTAINER:pn-core-image-minimal-initramfs = "Anuj Mittal <anuj.mittal@intel.com>"
8RECIPE_MAINTAINER_pn-core-image-minimal-initramfs = "California Sullivan <califorddnia.l.sullivan@intel.com>" 8RECIPE_MAINTAINER:pn-embree = "Naveen Saini <naveen.kumar.saini@intel.com>"
9RECIPE_MAINTAINER_pn-iucode-tool = "California Sullivan <california.l.sullivan@intel.com>" 9RECIPE_MAINTAINER:pn-gmmlib = "Lim Siew Hoon <siew.hoon.lim@intel.com>"
10RECIPE_MAINTAINER_pn-intel-vaapi-driver = "Anuj Mittal <anuj.mittal@intel.com>" 10RECIPE_MAINTAINER:pn-hdcp = "Naveen Saini <naveen.kumar.saini@intel.com>"
11RECIPE_MAINTAINER_pn-libyami = "Anuj Mittal <anuj.mittal@intel.com>" 11RECIPE_MAINTAINER:pn-intel-cmt-cat = "Naveen Saini <naveen.kumar.saini@intel.com>"
12RECIPE_MAINTAINER_pn-libyami-utils = "Anuj Mittal <anuj.mittal@intel.com>" 12RECIPE_MAINTAINER:pn-intel-compute-runtime = "Naveen Saini <naveen.kumar.saini@intel.com>"
13RECIPE_MAINTAINER_pn-linux-intel = "California Sullivan <california.l.sullivan@intel.com>" 13RECIPE_MAINTAINER:pn-intel-crypto-mb = "Anuj Mittal <anuj.mittal@intel.com>"
14RECIPE_MAINTAINER_pn-linux-intel-rt = "California Sullivan <california.l.sullivan@intel.com>" 14RECIPE_MAINTAINER:pn-intel-graphics-compiler = "Naveen Saini <naveen.kumar.saini@intel.com>"
15RECIPE_MAINTAINER_pn-lms7 = "TBD" 15RECIPE_MAINTAINER:pn-intel-media-driver = "Lim Siew Hoon <siew.hoon.lim@intel.com>"
16RECIPE_MAINTAINER_pn-lms8 = "TBD" 16RECIPE_MAINTAINER:pn-intel-mediasdk = "Lim Siew Hoon <siew.hoon.lim@intel.com>"
17RECIPE_MAINTAINER_pn-rmc = "Stephano Cetola <stephano.cetola@linux.intel.com>" 17RECIPE_MAINTAINER:pn-intel-microcode = "Anuj Mittal <anuj.mittal@intel.com>"
18RECIPE_MAINTAINER_pn-rmc-db = "Stephano Cetola <stephano.cetola@linux.intel.com>" 18RECIPE_MAINTAINER:pn-intel-vaapi-driver = "Lim Siew Hoon <siew.hoon.lim@intel.com>"
19RECIPE_MAINTAINER_pn-thermald = "California Sullivan <california.l.sullivan@intel.com>" 19RECIPE_MAINTAINER:pn-ipmctl = "Anuj Mittal <anuj.mittal@intel.com>"
20RECIPE_MAINTAINER_pn-va-intel = "Anuj Mittal <anuj.mittal@intel.com>" 20RECIPE_MAINTAINER:pn-isa-l = "Naveen Saini <naveen.kumar.saini@intel.com>"
21RECIPE_MAINTAINER_pn-xf86-video-ast = "Anuj Mittal <anuj.mittal@intel.com>" 21RECIPE_MAINTAINER:pn-ispc = "Naveen Saini <naveen.kumar.saini@intel.com>"
22RECIPE_MAINTAINER:pn-itt = "Naveen Saini <naveen.kumar.saini@intel.com>"
23RECIPE_MAINTAINER:pn-ixgbe = "Naveen Saini <naveen.kumar.saini@intel.com>"
24RECIPE_MAINTAINER:pn-ixgbevf = "Naveen Saini <naveen.kumar.saini@intel.com>"
25RECIPE_MAINTAINER:pn-iucode-tool = "Anuj Mittal <anuj.mittal@intel.com>"
26RECIPE_MAINTAINER:pn-level-zero = "Naveen Saini <naveen.kumar.saini@intel.com>"
27RECIPE_MAINTAINER:pn-libipt = "Naveen Saini <naveen.kumar.saini@intel.com>"
28RECIPE_MAINTAINER:pn-libva-intel = "Anuj Mittal <anuj.mittal@intel.com>"
29RECIPE_MAINTAINER:pn-libva-intel-utils = "Anuj Mittal <anuj.mittal@intel.com>"
30RECIPE_MAINTAINER:pn-libxcam = "Naveen Saini <naveen.kumar.saini@intel.com>"
31RECIPE_MAINTAINER:pn-linux-intel = "Anuj Mittal <anuj.mittal@intel.com>"
32RECIPE_MAINTAINER:pn-linux-intel-rt = "Anuj Mittal <anuj.mittal@intel.com>"
33RECIPE_MAINTAINER:pn-linux-intel-dev = "Naveen Saini <naveen.kumar.saini@intel.com>"
34RECIPE_MAINTAINER:pn-lms = "Anuj Mittal <anuj.mittal@intel.com>"
35RECIPE_MAINTAINER:pn-metee = "Naveen Saini <naveen.kumar.saini@intel.com>"
36RECIPE_MAINTAINER:pn-metrics-discovery = "Naveen Saini <naveen.kumar.saini@intel.com>"
37RECIPE_MAINTAINER:pn-oidn = "Naveen Saini <naveen.kumar.saini@intel.com>"
38RECIPE_MAINTAINER:pn-onednn = "Naveen Saini <naveen.kumar.saini@intel.com>"
39RECIPE_MAINTAINER:pn-onedpl = "Naveen Saini <naveen.kumar.saini@intel.com>"
40RECIPE_MAINTAINER:pn-onevpl = "Naveen Saini <naveen.kumar.saini@intel.com>"
41RECIPE_MAINTAINER:pn-onevpl-intel-gpu = "Yew Chang Ching <chang.ching.yew@intel.com>"
42RECIPE_MAINTAINER:pn-open-model-zoo = "Anuj Mittal <anuj.mittal@intel.com>"
43RECIPE_MAINTAINER:pn-opencl-clang = "Naveen Saini <naveen.kumar.saini@intel.com>"
44RECIPE_MAINTAINER:pn-openvino-inference-engine = "Anuj Mittal <anuj.mittal@intel.com>"
45RECIPE_MAINTAINER:pn-openvino-model-optimizer = "Anuj Mittal <anuj.mittal@intel.com>"
46RECIPE_MAINTAINER:pn-openvkl = "Naveen Saini <naveen.kumar.saini@intel.com>"
47RECIPE_MAINTAINER:pn-ospray = "Naveen Saini <naveen.kumar.saini@intel.com>"
48RECIPE_MAINTAINER:pn-ovmf-shell-image-enrollkeys = "Naveen Saini <naveen.kumar.saini@intel.com>"
49RECIPE_MAINTAINER:pn-rkcommon = "Naveen Saini <naveen.kumar.saini@intel.com>"
50RECIPE_MAINTAINER:pn-sbsigntool-native = "Anuj Mittal <anuj.mittal@intel.com>"
51RECIPE_MAINTAINER:pn-secureboot-selftest-image-signed = "Anuj Mittal <anuj.mittal@intel.com>"
52RECIPE_MAINTAINER:pn-secureboot-selftest-image-unsigned = "Anuj Mittal <anuj.mittal@intel.com>"
53RECIPE_MAINTAINER:pn-thermald = "Anuj Mittal <anuj.mittal@intel.com>"
54RECIPE_MAINTAINER:pn-xf86-video-ast = "Anuj Mittal <anuj.mittal@intel.com>"
diff --git a/conf/layer.conf b/conf/layer.conf
index 29a0f389..97dfb897 100644
--- a/conf/layer.conf
+++ b/conf/layer.conf
@@ -10,15 +10,36 @@ BBFILE_PATTERN_intel := "^${LAYERDIR}/"
10BBFILE_PRIORITY_intel = "5" 10BBFILE_PRIORITY_intel = "5"
11 11
12# Additional license directories. 12# Additional license directories.
13LICENSE_PATH += "${LAYERDIR}/custom-licenses" 13CUSTOM_LICENSES_PATH = "${LAYERDIR}/custom-licenses"
14LICENSE_PATH += "${CUSTOM_LICENSES_PATH}"
14 15
15LAYERDEPENDS_intel = "core" 16LAYERDEPENDS_intel = "core"
16LAYERRECOMMENDS_intel = "dpdk intel-qat" 17LAYERRECOMMENDS_intel = "dpdk"
17 18
18# This should only be incremented on significant changes that will 19# This should only be incremented on significant changes that will
19# cause compatibility issues with other layers 20# cause compatibility issues with other layers
20LAYERVERSION_intel = "5" 21LAYERVERSION_intel = "5"
21LAYERSERIES_COMPAT_intel = "sumo" 22LAYERSERIES_COMPAT_intel = "kirkstone scarthgap"
22 23
24BBFILES_DYNAMIC += " \
25 clang-layer:${LAYERDIR}/dynamic-layers/clang-layer/*/*/*.bb \
26 clang-layer:${LAYERDIR}/dynamic-layers/clang-layer/*/*/*.bbappend \
27 openembedded-layer:${LAYERDIR}/dynamic-layers/openembedded-layer/*/*/*.bb \
28 openembedded-layer:${LAYERDIR}/dynamic-layers/openembedded-layer/*/*/*.bbappend \
29 meta-python:${LAYERDIR}/dynamic-layers/meta-python/*/*/*.bb \
30 meta-python:${LAYERDIR}/dynamic-layers/meta-python/*/*/*.bbappend \
31"
23 32
24require ${LAYERDIR}/conf/include/maintainers.inc 33require ${LAYERDIR}/conf/include/maintainers.inc
34
35# Use the libva from OE-Core when layer is included but no MACHINE
36# from meta-intel is being used.
37PREFERRED_PROVIDER_libva ?= "libva"
38PREFERRED_PROVIDER_libva-native ?= "libva-native"
39PREFERRED_PROVIDER_nativesdk-libva ?= "nativesdk-libva"
40
41PREFERRED_PROVIDER_libva-utils ?= "libva-utils"
42PREFERRED_PROVIDER_libva-utils-native ?= "libva-utils-native"
43PREFERRED_PROVIDER_nativesdk-libva-utils ?= "nativesdk-libva-utils"
44
45# addpylib ${LAYERDIR}/lib oeqa
diff --git a/conf/machine/include/intel-common-pkgarch.inc b/conf/machine/include/intel-common-pkgarch.inc
index d0f208bd..94d77e06 100644
--- a/conf/machine/include/intel-common-pkgarch.inc
+++ b/conf/machine/include/intel-common-pkgarch.inc
@@ -1,15 +1,15 @@
1INTEL_COMMON_PACKAGE_ARCH ?= "${TUNE_PKGARCH}-intel-common" 1INTEL_COMMON_PACKAGE_ARCH ?= "${TUNE_PKGARCH}-intel-common"
2PACKAGE_ARCH_pn-linux-intel = "${INTEL_COMMON_PACKAGE_ARCH}" 2PACKAGE_ARCH:pn-linux-intel = "${INTEL_COMMON_PACKAGE_ARCH}"
3PACKAGE_ARCH_pn-linux-intel-rt = "${INTEL_COMMON_PACKAGE_ARCH}" 3PACKAGE_ARCH:pn-linux-intel-rt = "${INTEL_COMMON_PACKAGE_ARCH}"
4PACKAGE_ARCH_pn-linux-intel-tiny = "${INTEL_COMMON_PACKAGE_ARCH}" 4PACKAGE_ARCH:pn-linux-intel-tiny = "${INTEL_COMMON_PACKAGE_ARCH}"
5PACKAGE_ARCH_pn-linux-intel-dev = "${INTEL_COMMON_PACKAGE_ARCH}" 5PACKAGE_ARCH:pn-linux-intel-dev = "${INTEL_COMMON_PACKAGE_ARCH}"
6PACKAGE_ARCH_pn-linux-yocto = "${INTEL_COMMON_PACKAGE_ARCH}" 6PACKAGE_ARCH:pn-linux-yocto = "${INTEL_COMMON_PACKAGE_ARCH}"
7PACKAGE_ARCH_pn-linux-yocto-rt = "${INTEL_COMMON_PACKAGE_ARCH}" 7PACKAGE_ARCH:pn-linux-yocto-rt = "${INTEL_COMMON_PACKAGE_ARCH}"
8PACKAGE_ARCH_pn-linux-yocto-tiny = "${INTEL_COMMON_PACKAGE_ARCH}" 8PACKAGE_ARCH:pn-linux-yocto-tiny = "${INTEL_COMMON_PACKAGE_ARCH}"
9PACKAGE_ARCH_pn-linux-yocto-dev = "${INTEL_COMMON_PACKAGE_ARCH}" 9PACKAGE_ARCH:pn-linux-yocto-dev = "${INTEL_COMMON_PACKAGE_ARCH}"
10PACKAGE_ARCH_pn-intel-microcode = "${INTEL_COMMON_PACKAGE_ARCH}" 10PACKAGE_ARCH:pn-intel-microcode = "${INTEL_COMMON_PACKAGE_ARCH}"
11PACKAGE_ARCH_pn-backport-iwlwifi = "${INTEL_COMMON_PACKAGE_ARCH}" 11PACKAGE_ARCH:pn-backport-iwlwifi = "${INTEL_COMMON_PACKAGE_ARCH}"
12PACKAGE_ARCH_pn-ixgbe = "${INTEL_COMMON_PACKAGE_ARCH}" 12PACKAGE_ARCH:pn-ixgbe = "${INTEL_COMMON_PACKAGE_ARCH}"
13PACKAGE_ARCH_pn-ixgbevf = "${INTEL_COMMON_PACKAGE_ARCH}" 13PACKAGE_ARCH:pn-ixgbevf = "${INTEL_COMMON_PACKAGE_ARCH}"
14PACKAGE_EXTRA_ARCHS_append += "${INTEL_COMMON_PACKAGE_ARCH}" 14PACKAGE_EXTRA_ARCHS:append = " ${INTEL_COMMON_PACKAGE_ARCH}"
15MACHINEOVERRIDES =. "${INTEL_COMMON_PACKAGE_ARCH}:" 15MACHINEOVERRIDES =. "${INTEL_COMMON_PACKAGE_ARCH}:"
diff --git a/conf/machine/include/intel-core2-32-common.inc b/conf/machine/include/intel-core2-32-common.inc
index 8c469499..ce34d9bb 100644
--- a/conf/machine/include/intel-core2-32-common.inc
+++ b/conf/machine/include/intel-core2-32-common.inc
@@ -3,5 +3,5 @@
3# 3#
4 4
5DEFAULTTUNE ?= "core2-32" 5DEFAULTTUNE ?= "core2-32"
6require conf/machine/include/tune-core2.inc 6require conf/machine/include/x86/tune-core2.inc
7require conf/machine/include/x86-base.inc 7require conf/machine/include/x86/x86-base.inc
diff --git a/conf/machine/include/intel-corei7-64-common.inc b/conf/machine/include/intel-corei7-64-common.inc
index 00282569..3498ebe3 100644
--- a/conf/machine/include/intel-corei7-64-common.inc
+++ b/conf/machine/include/intel-corei7-64-common.inc
@@ -3,5 +3,5 @@
3# 3#
4 4
5DEFAULTTUNE ?= "corei7-64" 5DEFAULTTUNE ?= "corei7-64"
6require conf/machine/include/tune-corei7.inc 6require conf/machine/include/x86/tune-corei7.inc
7require conf/machine/include/x86-base.inc 7require conf/machine/include/x86/x86-base.inc
diff --git a/conf/machine/include/meta-intel.inc b/conf/machine/include/meta-intel.inc
index c5f9ceee..230d0253 100644
--- a/conf/machine/include/meta-intel.inc
+++ b/conf/machine/include/meta-intel.inc
@@ -4,33 +4,44 @@
4# to use them. 4# to use them.
5# 5#
6 6
7#
8# XSERVER subcomponents, used to build the XSERVER variable
9#
10
11# Soft set linux-yocto as preferred kernel like x86-base.inc
12PREFERRED_PROVIDER_virtual/kernel ?= "linux-intel" 7PREFERRED_PROVIDER_virtual/kernel ?= "linux-intel"
13PREFERRED_PROVIDER_virtual/kernel_poky-tiny ?= "linux-intel" 8PREFERRED_PROVIDER_virtual/kernel:poky-tiny ?= "linux-intel"
14PREFERRED_VERSION_linux-intel_linuxstdbase ?= "4.9%" 9
15PREFERRED_VERSION_linux-intel ?= "4.14%" 10PREFERRED_VERSION_linux-intel ?= "6.6%"
11PREFERRED_VERSION_linux-intel-rt ?= "6.6%"
12PREFERRED_VERSION_linux-intel:poky-altcfg ?= "6.8%"
13
14# Need to point to latest version of libva needed for media components
15PREFERRED_PROVIDER_libva = "libva-intel"
16PREFERRED_PROVIDER_libva-native = "libva-intel-native"
17PREFERRED_PROVIDER_nativesdk-libva = "nativesdk-libva-intel"
18
19PREFERRED_PROVIDER_libva-utils = "libva-intel-utils"
20PREFERRED_PROVIDER_libva-utils-native = "libva-intel-utils-native"
21PREFERRED_PROVIDER_nativesdk-libva-utils = "nativesdk-libva-intel-utils"
22
23LLVM_MAJOR_VERSION = "${@d.getVar('LLVMVERSION').split('.')[0]}"
24PREFERRED_VERSION_opencl-clang ?= "${@bb.utils.contains('LLVM_MAJOR_VERSION', '14', '14.0.0', '15.0.0', d)}"
25PREFERRED_VERSION_opencl-clang-native ?= "${@bb.utils.contains('LLVM_MAJOR_VERSION', '14', '14.0.0', '15.0.0', d)}"
16 26
17XSERVER_X86_ASPEED_AST = "xf86-video-ast \ 27XSERVER_X86_ASPEED_AST = "xf86-video-ast \
18 " 28 "
19 29
20# include the user space intel microcode loading support in the generated images. 30# include the user space intel microcode loading support in the generated images.
21MACHINE_ESSENTIAL_EXTRA_RDEPENDS_append = "${@bb.utils.contains('MACHINE_FEATURES', 'intel-ucode', ' intel-microcode', '', d)} thermald" 31MACHINE_ESSENTIAL_EXTRA_RDEPENDS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'intel-ucode', ' intel-microcode', '', d)}"
22 32
23# recommended extra packages common to all intel machines 33# recommended extra packages common to all intel machines
24MACHINE_EXTRA_RRECOMMENDS_append = " kernel-modules linux-firmware" 34MACHINE_EXTRA_RRECOMMENDS:append = " kernel-modules linux-firmware"
35MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS:append = " kernel-module-i915 linux-firmware-i915 kernel-module-igc kernel-module-r8152"
25 36
26# for the early boot time kernel microcode loading support, 37# for the early boot time kernel microcode loading support,
27# merge the microcode data in the final initrd image. 38# merge the microcode data in the final initrd image.
28INITRD_LIVE_prepend = "${@bb.utils.contains('MACHINE_FEATURES', 'intel-ucode', '${DEPLOY_DIR_IMAGE}/microcode.cpio ', '', d)}" 39INITRD_LIVE:prepend = "${@bb.utils.contains('MACHINE_FEATURES', 'intel-ucode', '${DEPLOY_DIR_IMAGE}/microcode.cpio ', '', d)}"
29 40
30DISK_SIGNATURE_UUID ??= "deadbeef-dead-beef-dead-beefdeadbeef" 41DISK_SIGNATURE_UUID ??= "deadbeef-dead-beef-dead-beefdeadbeef"
31 42
32EFI_PROVIDER ?= "systemd-boot" 43EFI_PROVIDER ?= "systemd-boot"
33EFI_PROVIDER_x86-x32 = "grub-efi" 44EFI_PROVIDER:x86-x32 = "grub-efi"
34 45
35# Add general MACHINEOVERRIDE for meta-intel 46# Add general MACHINEOVERRIDE for meta-intel
36MACHINEOVERRIDES =. "intel-x86-common:" 47MACHINEOVERRIDES =. "intel-x86-common:"
diff --git a/conf/machine/include/qemu-intel.inc b/conf/machine/include/qemu-intel.inc
index 81510404..4608db99 100644
--- a/conf/machine/include/qemu-intel.inc
+++ b/conf/machine/include/qemu-intel.inc
@@ -2,7 +2,7 @@
2# distro content (in particular the kernel) less than qemu.inc. 2# distro content (in particular the kernel) less than qemu.inc.
3 3
4# Ensure that qemu gets built when building images. 4# Ensure that qemu gets built when building images.
5EXTRA_IMAGEDEPENDS += "qemu-native qemu-helper-native" 5EXTRA_IMAGEDEPENDS += "qemu-system-native qemu-helper-native:do_addto_recipe_sysroot"
6 6
7# Build ovmf firmware for uefi support in qemu. 7# Build ovmf firmware for uefi support in qemu.
8EXTRA_IMAGEDEPENDS += "ovmf" 8EXTRA_IMAGEDEPENDS += "ovmf"
diff --git a/conf/machine/include/qemuboot-intel.inc b/conf/machine/include/qemuboot-intel.inc
index 6586cf09..17a1234d 100644
--- a/conf/machine/include/qemuboot-intel.inc
+++ b/conf/machine/include/qemuboot-intel.inc
@@ -1,15 +1,18 @@
1# For runqemu 1# For runqemu
2IMAGE_CLASSES += "qemuboot" 2IMAGE_CLASSES += "qemuboot"
3QB_SYSTEM_NAME_intel-core2-32 = "qemu-system-i386" 3QB_SYSTEM_NAME:intel-core2-32 = "qemu-system-i386"
4QB_CPU_intel-core2-32 = "-cpu coreduo" 4QB_CPU:intel-core2-32 = "-cpu coreduo"
5QB_CPU_KVM_intel-core2-32 = "-cpu kvm32" 5QB_CPU_KVM:intel-core2-32 = "-cpu kvm32"
6 6
7QB_SYSTEM_NAME_intel-corei7-64 = "qemu-system-x86_64" 7QB_SYSTEM_NAME:intel-corei7-64 = "qemu-system-x86_64"
8QB_CPU_intel-corei7-64 = "-cpu Nehalem" 8QB_CPU:intel-corei7-64 = "-cpu Nehalem"
9QB_CPU_KVM_intel-corei7-64 = "-cpu kvm64" 9QB_CPU_KVM:intel-corei7-64 = "-cpu kvm64"
10
11QB_SYSTEM_NAME:intel-skylake-64 = "qemu-system-x86_64"
12QB_CPU:intel-skylake-64 = "-cpu Skylake-Client"
13QB_CPU_KVM:intel-skylake-64 = "-cpu Skylake-Client"
10 14
11QB_AUDIO_DRV = "alsa" 15QB_AUDIO_DRV = "alsa"
12QB_AUDIO_OPT = "-soundhw ac97,es1370" 16QB_AUDIO_OPT = "-device AC97"
13QB_KERNEL_CMDLINE_APPEND = "vga=0 uvesafb.mode_option=640x480-32 oprofile.timer=1 uvesafb.task_timeout=-1" 17QB_KERNEL_CMDLINE_APPEND = " oprofile.timer=1"
14# Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy 18QB_OPT_APPEND = " -usb -usbdevice tablet "
15QB_OPT_APPEND = "-vga vmware -show-cursor -usb -usbdevice tablet -device virtio-rng-pci"
diff --git a/conf/machine/intel-core2-32.conf b/conf/machine/intel-core2-32.conf
index 90c7956d..5b134dc3 100644
--- a/conf/machine/intel-core2-32.conf
+++ b/conf/machine/intel-core2-32.conf
@@ -8,13 +8,10 @@ require conf/machine/include/intel-core2-32-common.inc
8require conf/machine/include/intel-common-pkgarch.inc 8require conf/machine/include/intel-common-pkgarch.inc
9 9
10MACHINE_FEATURES += "pcbios efi" 10MACHINE_FEATURES += "pcbios efi"
11MACHINE_FEATURES += "va-impl-intel"
12MACHINE_FEATURES += "wifi 3g nfc" 11MACHINE_FEATURES += "wifi 3g nfc"
13MACHINE_FEATURES += "intel-ucode" 12MACHINE_FEATURES += "intel-ucode"
14 13
15MACHINE_HWCODECS ?= "va-intel gstreamer1.0-vaapi" 14MACHINE_HWCODECS ?= "intel-vaapi-driver gstreamer1.0-vaapi"
16
17MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "gma500-gfx-check"
18 15
19XSERVER ?= "${XSERVER_X86_BASE} \ 16XSERVER ?= "${XSERVER_X86_BASE} \
20 ${XSERVER_X86_EXT} \ 17 ${XSERVER_X86_EXT} \
@@ -27,9 +24,9 @@ XSERVER ?= "${XSERVER_X86_BASE} \
27 " 24 "
28 25
29SYSLINUX_OPTS = "serial 0 115200" 26SYSLINUX_OPTS = "serial 0 115200"
30SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyPCH0" 27SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1 115200;ttyPCH0"
31APPEND += "rootwait console=ttyS0,115200 console=ttyPCH0,115200 console=tty0" 28APPEND += "rootwait console=ttyS0,115200 console=ttyPCH0,115200 console=tty0"
32 29
33IMAGE_FSTYPES += "wic" 30IMAGE_FSTYPES += "wic"
34WKS_FILE ?= "${@bb.utils.contains_any("EFI_PROVIDER", "systemd-boot rmc-boot", "systemd-bootdisk-microcode.wks", "mkefidisk.wks", d)}" 31WKS_FILE ?= "${@bb.utils.contains_any("EFI_PROVIDER", "systemd-boot", "systemd-bootdisk-microcode.wks.in", "grub-bootdisk-microcode.wks.in", d)}"
35WKS_FILE_DEPENDS_append = " intel-microcode" 32WKS_FILE_DEPENDS:append = " intel-microcode"
diff --git a/conf/machine/intel-corei7-64.conf b/conf/machine/intel-corei7-64.conf
index 9467d090..968395fe 100644
--- a/conf/machine/intel-corei7-64.conf
+++ b/conf/machine/intel-corei7-64.conf
@@ -8,22 +8,14 @@ require conf/machine/include/intel-corei7-64-common.inc
8require conf/machine/include/intel-common-pkgarch.inc 8require conf/machine/include/intel-common-pkgarch.inc
9 9
10MACHINE_FEATURES += "pcbios efi" 10MACHINE_FEATURES += "pcbios efi"
11MACHINE_FEATURES += "va-impl-intel"
12MACHINE_FEATURES += "wifi 3g nfc" 11MACHINE_FEATURES += "wifi 3g nfc"
13MACHINE_FEATURES += "intel-ucode" 12MACHINE_FEATURES += "intel-ucode"
14 13
15MACHINE_HWCODECS ?= "va-intel gstreamer1.0-vaapi" 14MACHINE_HWCODECS ?= "${@bb.utils.contains('TUNE_FEATURES', 'mx32', '', 'intel-media-driver intel-mediasdk', d)} gstreamer1.0-vaapi"
16
17MACHINE_EXTRA_RRECOMMENDS += "lms8"
18 15
19# Enable optional dpdk: 16# Enable optional dpdk:
20COMPATIBLE_MACHINE_pn-dpdk = "intel-corei7-64" 17COMPATIBLE_MACHINE:pn-dpdk = "intel-corei7-64"
21COMPATIBLE_MACHINE_pn-dpdk-dev-libibverbs = "intel-corei7-64" 18COMPATIBLE_MACHINE:pn-dpdk-module = "intel-corei7-64"
22
23# Enable optional QAT items:
24COMPATIBLE_MACHINE_pn-openssl-qat = "intel-corei7-64"
25COMPATIBLE_MACHINE_pn-qat16 = "intel-corei7-64"
26COMPATIBLE_MACHINE_pn-zlib-qat = "intel-corei7-64"
27 19
28XSERVER ?= "${XSERVER_X86_BASE} \ 20XSERVER ?= "${XSERVER_X86_BASE} \
29 ${XSERVER_X86_EXT} \ 21 ${XSERVER_X86_EXT} \
@@ -36,9 +28,9 @@ XSERVER ?= "${XSERVER_X86_BASE} \
36 " 28 "
37 29
38SYSLINUX_OPTS = "serial 0 115200" 30SYSLINUX_OPTS = "serial 0 115200"
39SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyS2" 31SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1 115200;ttyS2"
40APPEND += "rootwait console=ttyS0,115200 console=tty0" 32APPEND += "rootwait console=ttyS0,115200 console=tty0"
41 33
42IMAGE_FSTYPES += "wic" 34IMAGE_FSTYPES += "wic"
43WKS_FILE ?= "${@bb.utils.contains_any("EFI_PROVIDER", "systemd-boot rmc-boot", "systemd-bootdisk-microcode.wks", "mkefidisk.wks", d)}" 35WKS_FILE ?= "${@bb.utils.contains_any("EFI_PROVIDER", "systemd-boot", "systemd-bootdisk-microcode.wks.in", "grub-bootdisk-microcode.wks.in", d)}"
44WKS_FILE_DEPENDS_append = " intel-microcode" 36WKS_FILE_DEPENDS:append = " intel-microcode"
diff --git a/conf/machine/intel-skylake-64.conf b/conf/machine/intel-skylake-64.conf
new file mode 100644
index 00000000..a2b392c2
--- /dev/null
+++ b/conf/machine/intel-skylake-64.conf
@@ -0,0 +1,36 @@
1#@TYPE: Machine
2#@NAME: intel-skylake-64
3
4#@DESCRIPTION: Machine configuration for 64 bit Intel Skylake CPU (and later) with MMX, SSE, SSE2, SSE3, SSE4.1, SSE4.2, AVX, and AVX2 instruction set support. Supports a moderately wide range of drivers that should boot and be usable on "typical" hardware.
5
6require conf/machine/include/meta-intel.inc
7require conf/machine/include/x86/x86-base.inc
8require conf/machine/include/x86/tune-x86-64-v3.inc
9require conf/machine/include/intel-common-pkgarch.inc
10
11MACHINE_FEATURES += "efi"
12MACHINE_FEATURES += "wifi 3g nfc"
13MACHINE_FEATURES += "intel-ucode"
14
15MACHINE_HWCODECS ?= "intel-media-driver intel-mediasdk gstreamer1.0-vaapi"
16
17COMPATIBLE_MACHINE:pn-dpdk = "intel-skylake-64"
18COMPATIBLE_MACHINE:pn-dpdk-module = "intel-skylake-64"
19
20XSERVER ?= "${XSERVER_X86_BASE} \
21 ${XSERVER_X86_EXT} \
22 ${XSERVER_X86_FBDEV} \
23 ${XSERVER_X86_I915} \
24 ${XSERVER_X86_I965} \
25 ${XSERVER_X86_MODESETTING} \
26 ${XSERVER_X86_VESA} \
27 ${XSERVER_X86_ASPEED_AST} \
28 "
29
30SYSLINUX_OPTS = "serial 0 115200"
31SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1 115200;ttyS2"
32APPEND += "rootwait console=ttyS0,115200 console=tty0"
33
34IMAGE_FSTYPES += "wic"
35WKS_FILE ?= "${@bb.utils.contains_any("EFI_PROVIDER", "systemd-boot", "systemd-bootdisk-microcode.wks.in", "grub-bootdisk-microcode.wks.in", d)}"
36WKS_FILE_DEPENDS:append = " intel-microcode"
diff --git a/custom-licenses/BSD_LMS b/custom-licenses/BSD_LMS
deleted file mode 100755
index 2ea28ff4..00000000
--- a/custom-licenses/BSD_LMS
+++ /dev/null
@@ -1,30 +0,0 @@
1Copyright (C) 2004-2012 Intel Corporation. All rights reserved.
2
3• This license covers the sources of the Local Manageability Service (LMS).
4For licensing information for the LMS build scripts, please refer to the file build_script_license.txt.
5
6Redistribution and use in source and binary forms, with or without
7modification, are permitted provided that the following conditions are met:
8
9 - Redistributions of source code must retain the above copyright notice,
10 this list of conditions and the following disclaimer.
11
12 - Redistributions in binary form must reproduce the above copyright notice,
13 this list of conditions and the following disclaimer in the documentation
14 and/or other materials provided with the distribution.
15
16 - Neither the name of Intel Corporation. nor the names of its
17 contributors may be used to endorse or promote products derived from this
18 software without specific prior written permission.
19
20THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
21AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS
24BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30POSSIBILITY OF SUCH DAMAGE.
diff --git a/custom-licenses/EULA b/custom-licenses/EULA
new file mode 100644
index 00000000..549f78e1
--- /dev/null
+++ b/custom-licenses/EULA
@@ -0,0 +1,392 @@
1Intel End User License Agreement for Developer Tools (Version October 2021)
2
3IMPORTANT NOTICE - PLEASE READ AND AGREE BEFORE DOWNLOADING, INSTALLING, COPYING
4OR USING
5
6This Agreement is between you, or the company or other legal entity that you
7represent and warrant you have the legal authority to bind, (each, "You" or
8"Your") and Intel Corporation and its subsidiaries (collectively, "Intel")
9regarding Your use of the Materials. By downloading, installing, copying or
10using the Materials, You agree to be bound by the terms of this Agreement. If
11You do not agree to the terms of this Agreement, or do not have legal authority
12or required age to agree to them, do not download, install, copy or use the
13Materials.
14
151. LICENSE DEFINITIONS.
16
17 A. "Cloud Provider" means a third party service provider offering a cloud-based
18 platform, infrastructure, application or storage services, such as Microsoft
19 Azure or Amazon Web Services, which You may only utilize to host the
20 Materials subject to the restrictions set forth in Section 2.3 B.
21
22 B. "Derivative Work" means a derivative work, as defined in 17 U.S.C. 101, of
23 the Source Code.
24
25 C. "Executable Code" means computer programming code in binary form suitable
26 for machine execution by a processor without the intervening steps of
27 interpretation or compilation.
28
29 D. "Materials" mean the software, documentation, the software product serial
30 number, and other collateral, including any updates, made available to You
31 by Intel under this Agreement. Materials include Redistributables,
32 Executable Code, Source Code, Sample Source Code, and Pre-Release Materials,
33 but do not include Third Party Software.
34
35 E. "Pre-Release Materials" mean the Materials, or portions of the Materials,
36 that are identified (in the product release notes, on Intel's download
37 website for the Materials or elsewhere) or labeled as pre-release,
38 prototype, alpha or beta code and, as such, are deemed to be pre-release
39 code (i) which may not be fully functional or tested and may contain bugs or
40 errors; (ii) which Intel may substantially modify in its development of a
41 production version; or (iii) for which Intel makes no assurances that it
42 will ever develop or make a production version generally available.
43 Pre-Release Materials are subject to the terms of Section 3.2.
44
45 F. "Reciprocal Open Source Software" means any software that is subject to a
46 license which requires that (i) it must be distributed in source code form;
47 (ii) it must be licensed under the same open source license terms; and (iii)
48 its derivative works must be licensed under the same open source license
49 terms. Examples of this type of license are the GNU General Public License
50 or the Mozilla Public License.
51
52 G. "Redistributables" mean the files (if any) listed in the "redist.txt,"
53 "redist-rt.txt" or similarly-named text files that may be included in the
54 Materials. Redistributables include Sample Source Code.
55
56 H. "Sample Source Code" means those portions of the Materials that are Source
57 Code and are identified as sample code. Sample Source Code may not have been
58 tested or validated by Intel and is provided purely as a programming example.
59
60 I. "Source Code" means the software portion of the Materials provided in human
61 readable format.
62
63 J. "Third Party Software" mean the files (if any) listed in the
64 "third-party-software.txt" or other similarly-named text file that may be
65 included in the Materials for the applicable software. Third Party Software
66 is subject to the terms of Section 2.2.
67
68 K. "Your Product" means one or more applications, products or projects
69 developed by or for You using the Materials.
70
712. LICENSE GRANTS.
72
732.1 License to the Materials. Subject to the terms and conditions of this
74 Agreement, Intel grants You a non-exclusive, worldwide, non-assignable,
75 non-sublicensable, limited right and license under its copyrights, to:
76
77 A. reproduce internally a reasonable number of copies of the Materials for Your
78 personal or business use;
79
80 B. use the Materials solely for Your personal or business use to develop Your
81 Product, in accordance with the documentation included as part of the
82 Materials;
83
84 C. modify or create Derivative Works only of the Redistributables, or any
85 portions, that are provided to You in Source Code;
86
87 D. distribute (directly and through Your distributors, resellers, and other
88 channel partners, if applicable), the Redistributables, including any
89 modifications to or Derivative Works of the Redistributables or any portions
90 made pursuant to Section 2.1.C subject to the following conditions:
91
92 (1) Any distribution of the Redistributables must only be as part of Your
93 Product which must add significant primary functionality different than
94 that of the Redistributables themselves;
95
96 (2) You must only distribute the Redistributables originally provided to You
97 by Intel only in Executable Code subject to a license agreement that
98 prohibits reverse engineering, decompiling or disassembling the
99 Redistributables;
100
101 (3) This distribution right includes a limited right to sublicense only the
102 Intel copyrights in the Redistributables and only to the extent necessary
103 to perform, display, and distribute the Redistributables (including Your
104 modifications and Derivative Works of the Redistributables provided in
105 Source Code) solely as incorporated in Your Product; and
106
107 (4) You: (i) will be solely responsible to Your customers for any update,
108 support obligation or other obligation or liability which may arise from
109 the distribution of Your Product, (ii) will not make any statement that
110 Your Product is "certified" or that its performance is guaranteed by Intel
111 or its suppliers, (iii) will not use Intel's or its suppliers' names or
112 trademarks to market Your Product, (iv) will comply with any additional
113 restrictions which are included in the text files with the
114 Redistributables and in Section 3 below, (v) will indemnify, hold
115 harmless, and defend Intel and its suppliers from and against any claims
116 or lawsuits, costs, damages, and expenses, including attorney's fees, that
117 arise or result from (a) Your modifications or Derivative Works of the
118 Materials or (b) Your distribution of Your Product.
119
1202.2 Third Party Software. Third Party Software, even if included with the
121 distribution of the Materials, may be governed by separate license terms,
122 including without limitation, third party license terms, open source
123 software notices and terms, and/or other Intel software license terms. These
124 separate license terms solely govern Your use of the Third Party Software.
125
1262.3 Third Party Use.
127
128 A. If You are an entity, Your contractors may use the Materials under the
129 license specified in Section 2, provided: (i) their use of the Materials is
130 solely on behalf of and in support of Your business, (ii) they agree to the
131 terms and conditions of this Agreement, and (iii) You are solely responsible
132 for their use, misuse or disclosure of the Materials.
133
134 B. You may utilize a Cloud Provider to host the Materials for You, provided:
135 (i) the Cloud Provider may only host the Materials for Your exclusive use
136 and may not use the Materials for any other purpose whatsoever, including the
137 restriction set forth in Section 3.1(xi); (ii) the Cloud Provider's use of
138 the Materials must be solely on behalf of and in support of Your Product, and
139 (iii) You will indemnify, hold harmless, and defend Intel and its suppliers
140 from and against any claims or lawsuits, costs, damages, and expenses,
141 including attorney's fees, that arise or result from Your Cloud Provider's
142 use, misuse or disclosure of the Materials.
143
1443. LICENSE CONDITIONS.
145
1463.1 Restrictions. Except as expressly provided in this Agreement, You may NOT:
147 (i) use, reproduce, disclose, distribute, or publicly display the
148 Materials; (ii) share, publish, rent or lease the Materials to any third
149 party; (iii) assign this Agreement or transfer the Materials; (iv) modify,
150 adapt, or translate the Materials in whole or in part; (v) reverse engineer,
151 decompile, or disassemble the Materials, or otherwise attempt to derive the
152 source code for the software; (vi) work around any technical limitations in
153 the Materials; (vii) distribute, sublicense or transfer any Source Code,
154 modifications or Derivative Works of any Source Code to any third party;
155 (viii) remove, minimize, block or modify any notices of Intel or its
156 suppliers in the Materials; (ix) include the Redistributables in malicious,
157 deceptive, or unlawful programs or products or use the Materials in any way
158 that is against the law; (x) modify, create a Derivative Work, link, or
159 distribute the Materials so that any part of it becomes Reciprocal Open
160 Source Software; (xi) use the Materials directly or indirectly for SaaS
161 services or service bureau purposes (i.e., a service that allows use of or
162 access to the Materials by a third party as part of that service, such as
163 the salesforce.com service business model).
164
1653.2 Pre-Release Materials. If You receive Pre-Release Materials, You may
166 reproduce a reasonable number of copies and use the Pre-Release Materials
167 for evaluation and testing purposes only. You may not (i) modify or
168 incorporate the Pre-Release Materials into Your Product; (ii) continue to
169 use the Pre-Release Materials once a commercial version is released; or
170 (iii) disclose to any third party any benchmarks, performance results, or
171 other information relating to the Pre-Release Materials. Intel may waive
172 these restrictions in writing at its sole discretion; however, if You decide
173 to use the Pre-Release Materials in Your Product (even with Intel's waiver),
174 You acknowledge and agree that You are fully responsible for any and all
175 issues that result from such use.
176
1773.3 Safety-Critical, and Life-Saving Applications; Indemnity. The Materials may
178 provide information relevant to safety-critical applications
179 ("Safety-Critical Applications") to allow compliance with functional safety
180 standards or requirements. You acknowledge and agree that safety is Your
181 responsibility. To the extent You use the Materials to create, or as part
182 of, products used in Safety-Critical Applications, it is Your responsibility
183 to design, manage, and ensure that there are system-level safeguards to
184 anticipate, monitor, and control system failures, and You agree that You are
185 solely responsible for all applicable regulatory standards and
186 safety-related requirements concerning Your use of the Materials in Safety
187 Critical Applications.
188
189 Should You use the Materials for Safety-Critical Applications or in any type
190 of a system or application in which the failure of the Materials could
191 create a situation where personal injury or death may occur (e.g., medical
192 systems, life-sustaining or life-saving systems) ("Life-Saving
193 Applications"), You agree to indemnify, defend, and hold Intel and its
194 representatives harmless against any claims or lawsuits, costs, damages, and
195 expenses, including reasonable attorney fees, arising in any way out of Your
196 use of the Materials in Safety-Critical Applications or Life-Saving
197 Applications and claims of product liability, personal injury or death
198 associated with those applications; even if such claims allege that Intel
199 was negligent or strictly liable regarding the design or manufacture of the
200 Materials or its failure to warn regarding the Materials.
201
2023.4 Media Format Codecs and Digital Rights Management. You acknowledge and agree
203 that Your use of the Materials or distribution of the Redistributables with
204 Your Product as permitted by this Agreement may require You to procure
205 license(s) from third parties that may hold intellectual property rights
206 applicable to any media decoding, encoding or transcoding technology (e.g.,
207 the use of an audio or video codec) and/or digital rights management
208 capabilities of the Materials, if any. Should any such additional licenses
209 be required, You are solely responsible for obtaining any such licenses and
210 agree to obtain any such licenses at Your own expense.
211
2124. DATA COLLECTION AND PRIVACY.
213
2144.1 Data Collection. The Materials may generate and collect anonymous data
215 and/or provisioning data about the Materials and/or the development
216 environment and transmit the data to Intel as a one-time event during
217 installation. Optional data may also be collected by the Materials, however,
218 You will be provided notice of the request to collect optional data and no
219 optional data will be collected without Your consent. All data collection by
220 Intel is performed pursuant to relevant privacy laws, including notice and
221 consent requirements.
222
2234.2 Intel's Privacy Notice. Intel is committed to respecting Your privacy. To
224 learn more about Intel's privacy practices, please visit
225 http://www.intel.com/privacy.
226
2275. OWNERSHIP. Title to the Materials and all copies remain with Intel or its
228 suppliers. The Materials are protected by intellectual property rights,
229 including without limitation, United States copyright laws and international
230 treaty provisions. You will not remove any copyright or other proprietary
231 notices from the Materials. Except as expressly provided herein, no license
232 or right is granted to You directly or by implication, inducement, estoppel
233 or otherwise; specifically, Intel does not grant any express or implied right
234 to You under Intel patents, copyrights, trademarks, or trade secrets.
235
2366. NO WARRANTY AND NO SUPPORT.
237
2386.1 No Warranty. Disclaimer. Intel disclaims all warranties of any kind and the
239 terms and remedies provided in this Agreement are instead of any other
240 warranty or condition, express, implied or statutory, including those
241 regarding merchantability, fitness for any particular purpose,
242 non-infringement or any warranty arising out of any course of dealing, usage
243 of trade, proposal, specification or sample. Intel does not assume (and does
244 not authorize any person to assume on its behalf) any liability.
245
2466.2 No Support; Priority Support. Intel may make changes to the Materials, or to
247 items referenced therein, at any time without notice, but is not obligated
248 to support, update or provide training for the Materials under the terms of
249 this Agreement. Intel offers free community and paid priority support
250 options. More information on these support options can be found at:
251 https://software.intel.com/content/www/us/en/develop/support/priority-support.html.
252
2537. LIMITATION OF LIABILITY.
254
2557.1 Intel will not be liable for any of the following losses or damages (whether
256 such losses or damages were foreseen, foreseeable, known or otherwise): (i)
257 loss of revenue; (ii) loss of actual or anticipated profits; (iii) loss of
258 the use of money; (iv) loss of anticipated savings; (v) loss of business;
259 (vi) loss of opportunity; (vii) loss of goodwill; (viii) loss of use of the
260 Materials; (ix) loss of reputation; (x) loss of, damage to, or corruption of
261 data; or (xi) any indirect, incidental, special or consequential loss of
262 damage however caused (including loss or damage of the type specified in
263 this Section 7).
264
2657.2 Intel's total cumulative liability to You, including for direct damages for
266 claims relating to this Agreement, and whether for breach of contract,
267 negligence, or for any other reason, will not exceed $100.
268
2697.3 You acknowledge that the limitations of liability provided in this Section 7
270 are an essential part of this Agreement. You agree that the limitations of
271 liability provided in this Agreement with respect to Intel will be conveyed
272 to and made binding upon any customer of Yours that acquires the
273 Redistributables.
274
2758. USER SUBMISSIONS. Should you provide Intel with comments, modifications,
276 corrections, enhancements or other input ("Feedback") related to the
277 Materials, Intel will be free to use, disclose, reproduce, license or
278 otherwise distribute or exploit the Feedback in its sole discretion without
279 any obligations or restrictions of any kind, including without limitation,
280 intellectual property rights or licensing obligations. If You wish to provide
281 Intel with information that You intend to be treated as confidential
282 information, Intel requires that such confidential information be provided
283 pursuant to a non-disclosure agreement ("NDA"); please contact Your Intel
284 representative to ensure the proper NDA is in place.
285
2869. NON-DISCLOSURE. Information provided by Intel to You may include information
287 marked as confidential. You must treat such information as confidential under
288 the terms of the applicable NDA between Intel and You. If You have not
289 entered into an NDA with Intel, You must not disclose, distribute or make use
290 of any information marked as confidential, except as expressly authorized in
291 writing by Intel. Intel retains all rights in and to its confidential
292 information specifications, designs, engineering details, discoveries,
293 inventions, patents, copyrights, trademarks, trade secrets, and other
294 proprietary rights relating to the Materials. Any breach by You of the
295 confidentiality obligations provided for in this Section 9 will cause
296 irreparable injury to Intel for which money damages may be inadequate to
297 compensate Intel for losses arising from such a breach. Intel may obtain
298 equitable relief, including injunctive relief, if You breach or threaten to
299 breach Your confidentiality obligations.
300
30110. TERM AND TERMINATION. This Agreement becomes effective on the date You
302 accept this Agreement and will continue until terminated as provided for in
303 this Agreement. The term for any Pre-Release Materials terminates upon
304 release of a commercial version. This Agreement will terminate if You are in
305 breach of any of its terms and conditions. Upon termination, You will
306 promptly destroy the Materials and all copies. In the event of termination of
307 this Agreement, Your license to any Redistributables distributed by You in
308 accordance with the terms and conditions of this Agreement, prior to the
309 effective date of such termination, will survive any such termination of this
310 Agreement. Sections 1, 2.1.D(4)(v), 2.2, 2.3.A(iii), 2.3.B(iii), 3.3, 5, 6,
311 7, 8, 9, 10 (with respect to these survival provisions in the last sentence),
312 and 12 will survive expiration or termination of this Agreement.
313
31411. U.S. GOVERNMENT RESTRICTED RIGHTS. The technical data and computer software
315 covered by this license is a "Commercial Item," as such term is defined by
316 the FAR 2.101 (48 C.F.R. 2.101) and is "commercial computer software" and
317 "commercial computer software documentation" as specified under FAR 12.212
318 (48 C.F.R. 12.212) or DFARS 227.7202 (48 C.F.R. 227.7202), as applicable.
319 This commercial computer software and related documentation is provided to
320 end users for use by and on behalf of the U.S. Government with only those
321 rights as are granted to all other end users pursuant to the terms and
322 conditions of this Agreement.
323
32412. GENERAL PROVISIONS.
325
32612.1 ENTIRE AGREEMENT. This Agreement contains the complete and exclusive
327 agreement and understanding between the parties concerning the subject
328 matter of this Agreement, and supersedes all prior and contemporaneous
329 proposals, agreements, understanding, negotiations, representations,
330 warranties, conditions, and communications, oral or written, between the
331 parties relating to the same subject matter. Each party acknowledges and
332 agrees that in entering into this Agreement it has not relied on, and will
333 not be entitled to rely on, any oral or written representations,
334 warranties, conditions, understanding, or communications between the
335 parties that are not expressly set forth in this Agreement. The express
336 provisions of this Agreement control over any course of performance, course
337 of dealing, or usage of the trade inconsistent with any of the provisions
338 of this Agreement. The provisions of this Agreement will prevail
339 notwithstanding any different, conflicting, or additional provisions that
340 may appear on any purchase order, acknowledgement, invoice, or other
341 writing issued by either party in connection with this Agreement. No
342 modification or amendment to this Agreement will be effective unless in
343 writing and signed by authorized representatives of each party, and must
344 specifically identify this Agreement by its title and version (e.g., "Intel
345 End User License Agreement for Developer Tools (Version October 2021)");
346 except that Intel may make changes to this Agreement as it distributes new
347 versions of the Materials. When changes are made, Intel will make a new
348 version of the Agreement available on its website. If You received a copy
349 of this Agreement translated into another language, the English language
350 version of this Agreement will prevail in the event of any conflict between
351 versions.
352
35312.2 EXPORT. You acknowledge that the Materials and all related technical
354 information are subject to export controls and you agree to comply with all
355 laws and regulations of the United States and other applicable governments
356 governing export, re-export, import, transfer, distribution, and use of the
357 Materials. In particular, but without limitation, the Materials may not be
358 exported or re-exported (i) into any U.S. embargoed countries or (ii) to
359 any person or entity listed on a denial order published by the U.S.
360 government or any other applicable governments. By using the Materials, You
361 represent and warrant that You are not located in any such country or on
362 any such list. You also agree that You will not use the Materials for, or
363 sell or transfer them to a third party who is known or suspected to be
364 involved in, any purposes prohibited by the U.S. government or other
365 applicable governments, including, without limitation, the development,
366 design, manufacture, or production of nuclear, missile, chemical or
367 biological weapons.
368
36912.3 GOVERNING LAW, JURISDICTION, AND VENUE. All disputes arising out of or
370 related to this Agreement, whether based on contract, tort, or any other
371 legal or equitable theory, will in all respects be governed by, and
372 construed and interpreted under, the laws of the United States of America
373 and the State of Delaware, without reference to conflict of laws
374 principles. The parties agree that the United Nations Convention on
375 Contracts for the International Sale of Goods (1980) is specifically
376 excluded from and will not apply to this Agreement. All disputes arising
377 out of or related to this Agreement, whether based on contract, tort, or
378 any other legal or equitable theory, will be subject to the exclusive
379 jurisdiction of the courts of the State of Delaware or of the Federal
380 courts sitting in that State. Each party submits to the personal
381 jurisdiction of those courts and waives all objections to that jurisdiction
382 and venue for those disputes.
383
38412.4 SEVERABILITY. The parties intend that if a court holds that any provision
385 or part of this Agreement is invalid or unenforceable under applicable law,
386 the court will modify the provision to the minimum extent necessary to make
387 it valid and enforceable, or if it cannot be made valid and enforceable,
388 the parties intend that the court will sever and delete the provision or
389 part from this Agreement. Any change to or deletion of a provision or part
390 of this Agreement under this Section will not affect the validity or
391 enforceability of the remainder of this Agreement, which will continue in
392 full force and effect.
diff --git a/custom-licenses/ISSL b/custom-licenses/ISSL
new file mode 100644
index 00000000..f987e502
--- /dev/null
+++ b/custom-licenses/ISSL
@@ -0,0 +1,73 @@
1Intel Simplified Software License (Version August 2021)
2
3Use and Redistribution. You may use and redistribute the software (the
4"Software"), without modification, provided the following conditions are met:
5
6* Redistributions must reproduce the above copyright notice and the following
7 terms of use in the Software and in the documentation and/or other materials
8 provided with the distribution.
9* Neither the name of Intel nor the names of its suppliers may be used to
10 endorse or promote products derived from this Software without specific
11 prior written permission.
12* No reverse engineering, decompilation, or disassembly of this Software is
13 permitted.
14
15No other licenses. Except as provided in the preceding section, Intel grants no
16licenses or other rights by implication, estoppel or otherwise to, patent,
17copyright, trademark, trade name, service mark or other intellectual property
18licenses or rights of Intel.
19
20Third party software. The Software may contain Third Party Software. "Third
21Party Software" is open source software, third party software, or other Intel
22software that may be identified in the Software itself or in the files (if any)
23listed in the "third-party-software.txt" or similarly named text file included
24with the Software. Third Party Software, even if included with the distribution
25of the Software, may be governed by separate license terms, including without
26limitation, open source software license terms, third party software license
27terms, and other Intel software license terms. Those separate license terms
28solely govern your use of the Third Party Software, and nothing in this license
29limits any rights under, or grants rights that supersede, the terms of the
30applicable license terms.
31
32DISCLAIMER. THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
33WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
34MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT ARE
35DISCLAIMED. THIS SOFTWARE IS NOT INTENDED FOR USE IN SYSTEMS OR APPLICATIONS
36WHERE FAILURE OF THE SOFTWARE MAY CAUSE PERSONAL INJURY OR DEATH AND YOU AGREE
37THAT YOU ARE FULLY RESPONSIBLE FOR ANY CLAIMS, COSTS, DAMAGES, EXPENSES, AND
38ATTORNEYS' FEES ARISING OUT OF ANY SUCH USE, EVEN IF ANY CLAIM ALLEGES THAT
39INTEL WAS NEGLIGENT REGARDING THE DESIGN OR MANUFACTURE OF THE SOFTWARE.
40
41LIMITATION OF LIABILITY. IN NO EVENT WILL INTEL BE LIABLE FOR ANY DIRECT,
42INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
43BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
44DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
45LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
46OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
47ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
48
49No support. Intel may make changes to the Software, at any time without notice,
50and is not obligated to support, update or provide training for the Software.
51
52Termination. Your right to use the Software is terminated in the event of your
53breach of this license.
54
55Feedback. Should you provide Intel with comments, modifications, corrections,
56enhancements or other input ("Feedback") related to the Software, Intel will be
57free to use, disclose, reproduce, license or otherwise distribute or exploit the
58Feedback in its sole discretion without any obligations or restrictions of any
59kind, including without limitation, intellectual property rights or licensing
60obligations.
61
62Compliance with laws. You agree to comply with all relevant laws and regulations
63governing your use, transfer, import or export (or prohibition thereof) of the
64Software.
65
66Governing law. All disputes will be governed by the laws of the United States of
67America and the State of Delaware without reference to conflict of law
68principles and subject to the exclusive jurisdiction of the state or federal
69courts sitting in the State of Delaware, and each party agrees that it submits
70to the personal jurisdiction and venue of those courts and waives any
71objections. The United Nations Convention on Contracts for the International
72Sale of Goods (1980) is specifically excluded and will not apply to the
73Software.
diff --git a/custom-licenses/Intel-Microcode-License b/custom-licenses/Intel-Microcode-License
index af5b41c2..707d0908 100644
--- a/custom-licenses/Intel-Microcode-License
+++ b/custom-licenses/Intel-Microcode-License
@@ -1,123 +1,37 @@
1INTEL SOFTWARE LICENSE AGREEMENT 1Copyright (c) 2018-2019 Intel Corporation.
2 2All rights reserved.
3IMPORTANT - READ BEFORE COPYING, INSTALLING OR USING. 3
4Do not use or load this software and any associated materials (collectively, 4Redistribution.
5the "Software") until you have carefully read the following terms and 5
6conditions. By loading or using the Software, you agree to the terms of this 6Redistribution and use in binary form, without modification, are permitted,
7Agreement. If you do not wish to so agree, do not install or use the Software. 7provided that the following conditions are met:
8 8
9LICENSES: Please Note: 91. Redistributions must reproduce the above copyright notice and the
10- If you are a network administrator, the "Site License" below shall 10 following disclaimer in the documentation and/or other materials provided
11apply to you. 11 with the distribution.
12- If you are an end user, the "Single User License" shall apply to you. 12
13- If you are an original equipment manufacturer (OEM), the "OEM License" 132. Neither the name of Intel Corporation nor the names of its suppliers may
14shall apply to you. 14 be used to endorse or promote products derived from this software without
15 15 specific prior written permission.
16SITE LICENSE. You may copy the Software onto your organization's computers 16
17for your organization's use, and you may make a reasonable number of 173. No reverse engineering, decompilation, or disassembly of this software
18back-up copies of the Software, subject to these conditions: 18 is permitted.
19 19
201. This Software is licensed for use only in conjunction with Intel 20
21component products. Use of the Software in conjunction with non-Intel 21"Binary form" includes any format that is commonly used for electronic
22component products is not licensed hereunder. 22conveyance that is a reversible, bit-exact translation of binary
232. You may not copy, modify, rent, sell, distribute or transfer any part 23representation to ASCII or ISO text, for example "uuencode".
24of the Software except as provided in this Agreement, and you agree to 24
25prevent unauthorized copying of the Software. 25DISCLAIMER.
263. You may not reverse engineer, decompile, or disassemble the Software. 26
274. You may not sublicense or permit simultaneous use of the Software by 27THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28more than one user. 28AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
295. The Software may include portions offered on terms in addition to those 29IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30set out here, as set out in a license accompanying those portions. 30ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
31 31LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
32SINGLE USER LICENSE. You may copy the Software onto a single computer for 32CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
33your personal, noncommercial use, and you may make one back-up copy of the 33SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
34Software, subject to these conditions: 34INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
35 35CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
361. This Software is licensed for use only in conjunction with Intel 36ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37component products. Use of the Software in conjunction with non-Intel 37POSSIBILITY OF SUCH DAMAGE.
38component products is not licensed hereunder.
392. You may not copy, modify, rent, sell, distribute or transfer any part
40of the Software except as provided in this Agreement, and you agree to
41prevent unauthorized copying of the Software.
423. You may not reverse engineer, decompile, or disassemble the Software.
434. You may not sublicense or permit simultaneous use of the Software by
44more than one user.
455. The Software may include portions offered on terms in addition to those
46set out here, as set out in a license accompanying those portions.
47
48OEM LICENSE: You may reproduce and distribute the Software only as an
49integral part of or incorporated in Your product or as a standalone
50Software maintenance update for existing end users of Your products,
51excluding any other standalone products, subject to these conditions:
52
531. This Software is licensed for use only in conjunction with Intel
54component products. Use of the Software in conjunction with non-Intel
55component products is not licensed hereunder.
562. You may not copy, modify, rent, sell, distribute or transfer any part
57of the Software except as provided in this Agreement, and you agree to
58prevent unauthorized copying of the Software.
593. You may not reverse engineer, decompile, or disassemble the Software.
604. You may only distribute the Software to your customers pursuant to a
61written license agreement. Such license agreement may be a "break-the-
62seal" license agreement. At a minimum such license shall safeguard
63Intel's ownership rights to the Software.
645. The Software may include portions offered on terms in addition to those
65set out here, as set out in a license accompanying those portions.
66
67NO OTHER RIGHTS. No rights or licenses are granted by Intel to You, expressly
68or by implication, with respect to any proprietary information or patent,
69copyright, mask work, trademark, trade secret, or other intellectual property
70right owned or controlled by Intel, except as expressly provided in this
71Agreement.
72
73OWNERSHIP OF SOFTWARE AND COPYRIGHTS. Title to all copies of the Software
74remains with Intel or its suppliers. The Software is copyrighted and
75protected by the laws of the United States and other countries, and
76international treaty provisions. You may not remove any copyright notices
77from the Software. Intel may make changes to the Software, or to items
78referenced therein, at any time without notice, but is not obligated to
79support or update the Software. Except as otherwise expressly provided, Intel
80grants no express or implied right under Intel patents, copyrights,
81trademarks, or other intellectual property rights. You may transfer the
82Software only if the recipient agrees to be fully bound by these terms and if
83you retain no copies of the Software.
84
85LIMITED MEDIA WARRANTY. If the Software has been delivered by Intel on
86physical media, Intel warrants the media to be free from material physical
87defects for a period of ninety days after delivery by Intel. If such a defect
88is found, return the media to Intel for replacement or alternate delivery of
89the Software as Intel may select.
90
91EXCLUSION OF OTHER WARRANTIES. EXCEPT AS PROVIDED ABOVE, THE SOFTWARE IS
92PROVIDED "AS IS" WITHOUT ANY EXPRESS OR IMPLIED WARRANTY OF ANY KIND
93INCLUDING WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, OR FITNESS FOR A
94PARTICULAR PURPOSE. Intel does not warrant or assume responsibility for the
95accuracy or completeness of any information, text, graphics, links or other
96items contained within the Software.
97
98LIMITATION OF LIABILITY. IN NO EVENT SHALL INTEL OR ITS SUPPLIERS BE LIABLE
99FOR ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, LOST PROFITS,
100BUSINESS INTERRUPTION, OR LOST INFORMATION) ARISING OUT OF THE USE OF OR
101INABILITY TO USE THE SOFTWARE, EVEN IF INTEL HAS BEEN ADVISED OF THE
102POSSIBILITY OF SUCH DAMAGES. SOME JURISDICTIONS PROHIBIT EXCLUSION OR
103LIMITATION OF LIABILITY FOR IMPLIED WARRANTIES OR CONSEQUENTIAL OR INCIDENTAL
104DAMAGES, SO THE ABOVE LIMITATION MAY NOT APPLY TO YOU. YOU MAY ALSO HAVE
105OTHER LEGAL RIGHTS THAT VARY FROM JURISDICTION TO JURISDICTION.
106
107TERMINATION OF THIS AGREEMENT. Intel may terminate this Agreement at any time
108if you violate its terms. Upon termination, you will immediately destroy the
109Software or return all copies of the Software to Intel.
110
111APPLICABLE LAWS. Claims arising under this Agreement shall be governed by the
112laws of California, excluding its principles of conflict of laws and the
113United Nations Convention on Contracts for the Sale of Goods. You may not
114export the Software in violation of applicable export laws and regulations.
115Intel is not obligated under any other agreements unless they are in writing
116and signed by an authorized representative of Intel.
117
118GOVERNMENT RESTRICTED RIGHTS. The Software is provided with "RESTRICTED
119RIGHTS." Use, duplication, or disclosure by the Government is subject to
120restrictions as set forth in FAR52.227-14 and DFAR252.227-7013 et seq. or its
121successor. Use of the Software by the Government constitutes acknowledgment
122of Intel's proprietary rights therein. Contractor or Manufacturer is Intel
1232200 Mission College Blvd., Santa Clara, CA 95052.
diff --git a/custom-licenses/syrah b/custom-licenses/syrah
new file mode 100644
index 00000000..5cd7f4e6
--- /dev/null
+++ b/custom-licenses/syrah
@@ -0,0 +1,32 @@
1Copyright (c) 2009, Stanford University, and authors listed below.
2All rights reserved.
3
4Original authors:
5 Solomon Boulos
6
7Redistribution and use in source and binary forms, with or without
8modification, are permitted provided that the following conditions are
9met:
10
11Redistributions of source code must retain the above copyright notice,
12this list of conditions and the following disclaimer.
13
14Redistributions in binary form must reproduce the above copyright
15notice, this list of conditions and the following disclaimer in the
16documentation and/or other materials provided with the distribution.
17
18Neither the name of Stanford University nor the names of its
19contributors may be used to endorse or promote products derived from
20this software without specific prior written permission.
21
22THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file
diff --git a/documentation/building_and_booting.md b/documentation/building_and_booting.md
new file mode 100644
index 00000000..478a4fb0
--- /dev/null
+++ b/documentation/building_and_booting.md
@@ -0,0 +1,134 @@
1### Building the Intel BSP layers
2
3The intel-common BSP provide a few carefully selected tune options and
4generic hardware support to cover the majority of current Intel CPUs and
5devices. The naming follows the convention of intel-<TUNE>-<BITS>, where
6TUNE is the gcc cpu-type (used with mtune and march typically) and BITS
7is either 32 bit or 64 bit.
8
9In order to build an image with BSP support for a given release, you
10need to clone the meta-intel layer from git repository:
11```
12git clone https://git.yoctoproject.org/meta-intel
13```
14
15Check out the appropriate branch or release tags. The branch name and tags
16would align with Yocto Project
17[Release Codenames](https://wiki.yoctoproject.org/wiki/Releases).
18Assuming meta-intel repository is cloned at the top-level of
19OE-Core build tree, you can build a BSP image by adding the location of
20the meta-intel layer to bblayers.conf:
21```
22BBLAYERS = " \
23 /openembedded-core/meta \
24 /openembedded-core/meta-intel "
25```
26
27To enable a particular machine, add a MACHINE line naming the BSP
28to the local.conf file:
29```
30MACHINE ?= "intel-corei7-64"
31```
32
33where this can be replaced by other MACHINE types available:
34
35 - intel-core2-32
36
37 This BSP is optimized for the Core2 family of CPUs as well as all
38 Atom CPUs prior to the Silvermont core.
39
40 - intel-corei7-64
41
42 This BSP is optimized for Nehalem and later Core and Xeon CPUs as
43 well as Silvermont and later Atom CPUs, such as the Baytrail SoCs.
44
45 - intel-skylake-64
46
47 This BSP uses [x86-64-v3 tuning](https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html).
48
49You should then be able to build an image as such:
50```
51$ source oe-init-build-env
52$ bitbake core-image-sato
53```
54
55At the end of a successful build, you should have an image that
56you can boot from a USB flash drive.
57
58
59## Booting the intel-common BSP images
60
61If you've built your own image, you'll find the bootable
62image in the build/tmp/deploy/images/{MACHINE} directory, where
63'MACHINE' refers to the machine name used in the build.
64
65Under Linux, insert a USB flash drive. Assuming the USB flash drive
66takes device /dev/sdf, use dd to copy the image to it. Before the image
67can be burned onto a USB drive, it should be un-mounted. Some Linux distros
68may automatically mount a USB drive when it is plugged in. Using USB device
69/dev/sdf as an example, find all mounted partitions:
70```
71$ mount | grep sdf
72```
73
74and un-mount those that are mounted, for example:
75```
76$ umount /dev/sdf1
77$ umount /dev/sdf2
78```
79
80Now burn the image onto the USB drive:
81```
82$ sudo dd if=core-image-sato-intel-corei7-64.wic of=/dev/sdf status=progress
83$ sync
84$ eject /dev/sdf
85```
86
87This should give you a bootable USB flash device. Insert the device
88into a bootable USB socket on the target, and power on. This should
89result in a system booted to the Sato graphical desktop.
90
91If you want a terminal, use the arrows at the top of the UI to move to
92different pages of available applications, one of which is named
93'Terminal'. Clicking that should give you a root terminal.
94
95If you want to ssh into the system, you can use the root terminal to
96ifconfig the IP address and use that to ssh in. The root password is
97empty, so to log in type 'root' for the user name and hit 'Enter' at
98the Password prompt: and you should be in.
99
100If you find you're getting corrupt images on the USB (it doesn't show
101the syslinux boot: prompt, or the boot: prompt contains strange
102characters), try doing this first:
103```
104$ dd if=/dev/zero of=/dev/sdf bs=1M count=512
105```
106
107## Building the installer image
108
109If you plan to install your image to your target machine, you can build a wic
110based installer image instead of default wic image. To build it, you need to
111add below configuration to local.conf :
112
113```
114WKS_FILE = "image-installer.wks.in"
115IMAGE_FSTYPES:append = " ext4"
116IMAGE_TYPEDEP:wic = "ext4"
117INITRD_IMAGE_LIVE="core-image-minimal-initramfs"
118do_image_wic[depends] += "${INITRD_IMAGE_LIVE}:do_image_complete"
119do_rootfs[depends] += "virtual/kernel:do_deploy"
120IMAGE_BOOT_FILES:append = "\
121 ${KERNEL_IMAGETYPE} \
122 microcode.cpio \
123 ${IMGDEPLOYDIR}/${IMAGE_BASENAME}-${MACHINE}.rootfs.ext4;rootfs.img \
124 ${@bb.utils.contains('EFI_PROVIDER', 'grub-efi', 'grub-efi-bootx64.efi;EFI/BOOT/bootx64.efi', '', d)} \
125 ${@bb.utils.contains('EFI_PROVIDER', 'grub-efi', '${IMAGE_ROOTFS}/boot/EFI/BOOT/grub.cfg;EFI/BOOT/grub.cfg', '', d)} \
126 ${@bb.utils.contains('EFI_PROVIDER', 'systemd-boot', 'systemd-bootx64.efi;EFI/BOOT/bootx64.efi', '', d)} \
127 ${@bb.utils.contains('EFI_PROVIDER', 'systemd-boot', '${IMAGE_ROOTFS}/boot/loader/loader.conf;loader/loader.conf ', '', d)} \
128 ${@bb.utils.contains('EFI_PROVIDER', 'systemd-boot', '${IMAGE_ROOTFS}/boot/loader/entries/boot.conf;loader/entries/boot.conf', '', d)} "
129```
130
131Burn the wic image onto USB flash device, insert the device to target machine
132and power on. This should start the installation process.
133
134
diff --git a/documentation/dpcpp-compiler.md b/documentation/dpcpp-compiler.md
new file mode 100644
index 00000000..b709a685
--- /dev/null
+++ b/documentation/dpcpp-compiler.md
@@ -0,0 +1,107 @@
1Intel(R) oneAPI DPC++/C++ Compiler (ICX) toolchain
2==========================================================================
3
4Get Started with the Intel oneAPI DPC++/C++ Compiler:
5
6https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compiler.html#
7
8
9Getting Started
10===============
11
12Clone the required layers and include them in bblayers.conf:
13
14```
15git clone https://git.openembedded.org/openembedded-core
16git clone https://git.openembedded.org/bitbake
17git clone https://git.openembedded.org/meta-openembedded
18git clone https://github.com/kraj/meta-clang.git
19git clone https://git.yoctoproject.org/meta-intel
20
21$ source openembedded-core/oe-init-build-env
22
23$ bitbake-layers add-layer ../meta-openembedded/meta-oe/
24$ bitbake-layers add-layer ../meta-intel
25$ bitbake-layers add-layer ../meta-clang
26```
27
28Distro
29======
30
31Note that oneAPI DPC++/C++ compiler currently only works when the vendor string is "oe".
32
33```
34DISTRO ?= "nodistro"
35```
36
37MACHINE configuration
38=====================
39
40```
41MACHINE ?= "intel-skylake-64"
42```
43
44Package installation
45====================
46
47```
48# To include OpenCL driver that might be needed when compiling SYCL programs, include:
49IMAGE_INSTALL:append = " intel-compute-runtime intel-graphics-compiler"
50
51# To install only runtime libraries, include:
52IMAGE_INSTALL:append = " intel-oneapi-dpcpp-cpp-runtime intel-oneapi-dpcpp-cpp-runtime-dev"
53
54# To install the toolchain, include:
55IMAGE_INSTALL:append = " intel-oneapi-dpcpp-cpp intel-oneapi-dpcpp-cpp-dev"
56```
57in local.conf.
58
59Build an image
60==============
61
62```
63$ bitbake core-image-minimal
64```
65
66Including oneAPI C++/DPC++ compiler in generated SDK toolchain
67==============================================================
68
69The compiler is not included in the generated SDK by default. If it is expected to be part of SDK, add ICXSDK = "1" in local.conf:
70
71```
72ICXSDK = "1"
73```
74
75Generate SDK:
76```
77bitbake core-image-minimal -c populate_sdk
78```
79
80
81To setup PATH variables on target
82=================================
83
84Once image is booted successfully, some variables would need to be exported to make sure compiler can be used:
85
86```
87$ source /opt/intel/oneapi/compiler/2022.1.0/env/vars.sh
88
89$ mkdir -p /lib64
90
91$ ln -sf /lib/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2
92```
93
94Build application and run
95=========================
96
97To compile a sycl application, for example:
98
99```
100$ icpx --target=x86_64-oe-linux -fsycl simple-sycl-app.c -o simple-sycl-app
101```
102
103To run:
104
105```
106$ ./simple-sycl-app
107```
diff --git a/documentation/reporting_bugs.md b/documentation/reporting_bugs.md
new file mode 100644
index 00000000..5fbc3d27
--- /dev/null
+++ b/documentation/reporting_bugs.md
@@ -0,0 +1,22 @@
1## Reporting bugs
2
3If you have problems with or questions about a particular BSP, please
4contact the maintainer listed in the [Maintainer](../README.md#maintainers) section directly (cc:ing
5the Yocto mailing list puts it in the archive and helps other people
6who might have the same questions in the future), but please try to do
7the following first:
8
9- look in the [Yocto Project Bugzilla](http://bugzilla.yoctoproject.org/) to see if a
10 problem has already been reported
11
12- look through recent entries of the [meta-intel](https://lists.yoctoproject.org/g/meta-intel/messages)
13 and [Yocto Archives](https://lists.yoctoproject.org/g/yocto/messages) mailing list archives to see
14 if other people have run into similar problems or had similar questions answered.
15
16If you believe you have encountered a bug, you can open a new bug and
17enter the details in the [Yocto Project Bugzilla](https://bugzilla.yoctoproject.org/).
18If you're relatively certain that it's a bug against the BSP itself, please use the
19'BSPs | bsps-meta-intel' category for the bug; otherwise, please submit the bug against
20the most likely category for the problem. if you're wrong, it's not a big deal and
21the bug will be recategorized upon triage.
22
diff --git a/documentation/rmc/README b/documentation/rmc/README
deleted file mode 100644
index 2c352f29..00000000
--- a/documentation/rmc/README
+++ /dev/null
@@ -1,373 +0,0 @@
1Runtime Machine Configuration (RMC)
2--------------------------------------------------------------------------------
3Table of Contents
4
5Introduction
6Usage
7Enable RMC Feature
8Examples
9Troubleshooting
10When you (don't) need RMC feature
11
12
13Introduction:
14--------------------------------------------------------------------------------
15RMC Project - a light-weight project provide developers a mechanism to keep
16their software implementation board-type agnostic, yet still able to customize
17software behavior according to the type of a running board at runtime. Recipes
18and bbclasses are available for other components to reuse to construct their own
19RMC database.
20
21RMC Feature - An end-to-end solution based on RMC project to have a generic
22image capable to apply board-type-specific quirks and configurations for a board
23at runtime. It consists of a modified bootloader (systemd-boot), an updated EFI
24installer, recipes, bbclass and RMC project.
25
26RMC feature supports special customizations cannot be covered by conventional
27auto-detection features based on probing a hardware module because they happen
28at a board or a product level. For example:
29 - tty console for kernel log output in kernel cmdline
30 - default audio route configuration
31 - network configuration
32 - UI layout
33 - requirement to software driven by a mechanical design
34 - or static configuration bits for a physical bus that doesn't support to
35 identify devices or their presence at runtime
36
37An image with the feature has ability to configure supported boards with data
38associated only to a type of board to get full functionality of the target at
39runtime, yet still with a single image.
40
41Effect after installation is identical to what a conventional image specially
42customized for a type of board (depending on the way to deploy image).
43
44Main functions of RMC Feature:
45
46Show board-specific boot entries in boot menu and boot system with configuration
47(boot title, boot options, etc) in a selected boot entry.
48
49Support a "global" kernel boot command line fragment which is effective for all
50boot entries.
51
52Deploy file blobs and create directories specific to the type of running board.
53
54Beside from this document, you can also find several built-in examples in
55common/recipes-bsp/rmc/boards/. Refer to "Examples" section.
56
57You can also add new board types in your layer via a simple variable.
58
59
60
61Usage
62--------------------------------------------------------------------------------
63Developers are suggested to organize all board-specific files in their own layer
64following this example, so that RMC recipes can pick up them correctly in build.
65
66- my_top_dir/ Top directory of your board (Note 0)
67 |- rmc-db.bbappend bbappend file to rmc-db recipe at a lower level
68 |- rmc/
69 |- target_board_1/ subdirectory of a board.
70 | |- board1.fp fingerprint file must be provided (NOTE 1)
71 | |- BOOTENTRY.CONFIG optional config file for boot entries. (NOTE 2)
72 | |- INSTALLER.CONFIG optional config file for installer. (NOTE 3)
73 | |- POSTINSTALL.sh optional script hook for installer (NOTE 4)
74 | |- board_file_1 A file blob specific to the type of board
75 | |- board_file_2 An another file specific to the type of board
76 | |- ...more files
77 |- target_board_2/ subdirectory of another board.
78 |- board_2_v2.fp fingerprint file for board 2.
79 |- BOOTENTRY.CONFIG
80 |- INSTALLER.CONFIG
81 |- board_file_1
82 |- ...more files
83
84Note 0:
85Developers are expected to use variable RMC_BOARD_DATA_DIRS to specify data of
86boards packed into RMC database file generated in a build. The default value of
87the variable in meta-intel specifies a group of boards. They work as examples
88and necessary quirks for these boards to function properly. Developers can
89override, append to the default boards with data of their own boards in the
90database file, or even disable the generation of the database file.
91
92For example, in your local.conf file:
93
94This line adds your boards along with the default boards into RMC database file,
95assuming you have a directory named "rmc" which has a subdirectory for each
96board:
97
98RMC_BOARD_DATA_DIRS_append = " /path_of/rmc"
99
100This line directs RMC to pack data of your boards only, without data of the
101default boards in meta-intel:
102
103RMC_BOARD_DATA_DIRS = "/path_of/rmc"
104
105And this line disables database generation:
106
107RMC_BOARD_DATA_DIRS = ""
108
109Please also refer to the "Example 1" in this document.
110
111Subdirectory is not supported in a board's directory.
112
113Note 1:
114Fingerprint files must be provided and with ".fp" at the end of their names.
115Fingerprint can be obtained by running RMC tool on your board. An easy way is to
116live-boot USB stick flashed with any image enabled this feature on your board,
117then run this command:
118
119# rmc -F -o my_board.fp
120
121Or you will need to build RMC tool for the architecture of your board, 32 or
12264 bit x86, from RMC project.
123
124You can run RMC tool without any argument to get usage and examples.
125
126DO NOT NAME ANY FILE ENDING WITH '.fp' IF IT IS NOT A RMC FINGERPRINT FILE.
127
128If you do need a .fp file deployed onto target, please rename it in source and
129specify the real name of file on target in INSTALLER.CONFIG.
130
131Note 2:
132At runtime, RMC bootloader tries to fetch this file specific to the board at run
133time, then tries to fetch each boot entry file specified in BOOTENTRY.CONFIG and
134show them in boot menu options. The format of this file is very simple. Each
135line is the name of a boot entry file:
136
137boot.conf
138Install.conf
139myrmcboot.conf
140
141Name of a boot entry file is defined by developer so it can be anything. But the
142name of config file is what RMC bootloader looks up in RMC database, so it must
143be named BOOTENTRY.CONFIG.
144
145Bootloader skips loading entry conf files from disk once any entry is loaded
146from RMC database.
147
148Note 3:
149At runtime, RMC installer tries to fetch INSTALLER.CONFIG file specific to the
150board, then tries to fetch each file specified in this config file, and then
151deploy the file onto target with its permissions, UID, GID and other attributes
152also specified in this config file if file for the board can be retrieved from
153RMC database. The format of this file is (# is for comment line)
154
155# name:uid:gid:mode:path_on_target
156# to create a directory, add a “/†at the end of path_on_target:
157audio_policy:0:0:600:/etc/audio/
158audio_def_policy:0:0:600:/etc/audio/audio_policy
159
160The above example creates /etc/audio directory first, then fetch a file named
161“audio_def_policy†from RMC database for the board, then copy it to /etc/audio/
162with a new name “audio_policyâ€.
163
164If this config file is not provided, No data in RMC database is deployed to the
165target.
166
167Some steps defined by developers could not be supported on a filesystem.
168Installer simply ignores any errors in RMC deployment stage.
169
170The name of this config file is what installer looks up first, so it must be
171INSTALLER.CONFIG.
172
173Note 4:
174At the end of RMC deployment during installation, RMC installer queries a script
175file POSTINSTALL.sh from RMC database file, and execute it when query is
176successful on the running board. This hook provides developers almost ultimate
177flexibility to retouch what have been deployed on the target. There are some
178steps still can override results from this hook for boot entries and KBOOTPARAM.
179
180
181
182Enable RMC Feature
183--------------------------------------------------------------------------------
184To enable the RMC feature please add the following variables to your local.conf.
185
186DISTRO_FEATURES_append = " rmc"
187EFI_PROVIDER = "rmc-boot"
188
189The default EFI bootloader used with RMC is systemd-boot. To change the default
190bootloader please overwrite the RMC_BOOTLOADER variable in your local.conf
191
192Note:
193Image could be still bootable if you only have either of two lines, but RMC
194feature could not be fully functional, depending on the availability of the
195database file, installer and the rmc tool.
196
197Examples
198--------------------------------------------------------------------------------
199We checked in configuration data in common/recipes-bsp/rmc/boards/ for several
200boards, to help users to understand the RMC feature. These examples are also for
201validation. For any example you find not working as what this section depicts,
202it should be treated as a bug to be fixed.
203
204To test this feature with examples, enable it and build an image first, then
205boot the built image on supported boards. Examples are always built in when the
206feature is enabled, except for the EXAMPLE 1.
207
208EXAMPLE 1: Support a new board type:
209(1) enable the feature and do a build to get a live-boot image by adding these
210 lines in conf/local.conf:
211 DISTRO_FEATURES_append = " rmc"
212 EFI_PROVIDER = "rmc-boot"
213
214(2) flash the image to a USB stick and boot it on your board
215
216(3) in super user mode, run "rmc -F -o my_board.fp"
217
218(4) create directories in your host "mkdir -p my_top_dir/my_rmc/my_board"
219
220(5) copy my_board.fp from target to my_top_dir/my_rmc/my_board/ on host
221
222(6) create a file my_top_dir/my_rmc/my_board/KBOOTPARAM, put some fake
223 and harmless options in a single line, say, "loglevel=7"
224
225(7) create a file my_top_dir/rmc-db.bbappend, put this single line in it:
226 RMC_BOARD_DATA_DIRS_append := " ${THISDIR}/my_rmc"
227 From parent directory of my_top_dir, the tree should look like:
228 my_top_dir/
229 my_rmc/
230 my_board/
231 KBOOTPARAM
232 my_board.fp
233 rmc-db.bbappend
234 Later, you can add more board directories in my_rmc directory.
235
236(8) modify build configuration to add my_top_dir into build, for example, put
237 this line in a bblayers.conf:
238 BBFILES += "/full/path/of/my_top_dir/rmc-db.bbappend"
239
240(9) build image again then boot it on your board
241
242(10) Once you login to shell, new options should be effective, run this command
243 "cat /proc/cmdline" to verify the result.
244
245EXAMPLE 2: Board-specific boot entry
246MinnowBoard MAX and B3 version:
247common/recipes-bsp/rmc/boards/minnowmax
248common/recipes-bsp/rmc/boards/minnowmaxB3
249
250We have found two identities (type of board) exist for the "same" Minnow Max
251hardware, so they have to be treated as two different types of hardware. The two
252examples show you a boot entry specific to a type of board. Titles shown in boot
253menu have different names according to the type of running board, "Minnow Max
254boot" or "Minnow Max B3 boot". in /proc/cmdline, "console=ttyS0,115200n8" shall
255be there. Kernel prints logs from 6-pin FTDI serial port on Minnow Max(s). This
256console setting is in board-specific entries, so you won't see it effective if
257you select default "boot" entry to boot the device.
258
259EXAMPLE 3: Board-specific boot entry, global kernel cmdline and installer
260NUC Gen 6:
261common/recipes-bsp/rmc/boards/nucgen6
262This is a combo example with all supported configuration data for NUC Gen 6
263product. It shows two boot entries in bootloader menu when you boot image on NUC
264Gen 6 product, with "NUC Gen6" in entry titles. There shall no any "console=" in
265/proc/cmdline when you boot with either of two "NUC Gen6"entries. We designed it
266this way because there is no accessible tty port on NUC Gen 6 with housing. The
267post-install hook is also provided in this example.
268
269This example also includes a global kernel cmdline fragment KBOOTPARAM. Content
270of KBOOTPARAM shall be at the end of /proc/cmdline no matter which boot entry
271you selected to boot NUC Gen6.
272
273INSTALLER.CONFIG directs installer to create a directory and deploy a file in it
274when install the image on NUC Gen6.
275
276Choose "NUC Gen6 install" boot entry to boot shall start installation. Once
277the device reboots after installation, we can verify the configurations.
278
279The boot entry "NUC Gen6 boot" shall be shown in boot menu.
280
281The content of KBOOTPARAM shall be in /proc/cmdline too.
282
283A directory /etc/mylib/ is created and a file "mylib.conf" is there. The content
284of that file shall be what we put in mylib.conf in
285common/recipes-bsp/rmc/boards/nucgen6
286
287POSTINSTALL.sh shows how we get rid of an error message caused by no serial
288console available on NUC Gen 6, without creating another static board
289configuration.
290
291EXAMPLE 4: For validation only
292T100 (32bit):
293common/recipes-bsp/rmc/boards/T100-32bit
294This example is provided for validation on 32 bit X86 architecture. It doesn't
295provide any new function not mentioned in above examples.
296
297Troubleshooting
298--------------------------------------------------------------------------------
299Issue: Cannot obtain RMC fingerprint for a board
300
301RMC tool requires UEFI BIOS and SMBIOS support in firmware. It doesn't support
302other type of firmware, e.g. legacy BIOS. It also requires EFI driver enabled
303in Linux kernel.
304
305Issue: Configuration for a board seems not effective at runtime.
306
307Check if board is booted from the storage where the image or installation lives
308when you have multiple boot options in BIOS. On some old hardwares it is not
309that obvious as you assume. A build image can support boot from both of legacy
310and UEFI mode, but RMC only works with UEFI boot so far.
311
312Make sure configuration files (BOOTENTRY.CONFIG, INSTALLER.CONFIG and,
313KBOOTPARAM ...) are properly named in the board directory.
314
315Make sure configuration files have correct contents.
316
317Some file attributes could not be supported by targeted file system. Installer
318cannot setup file blobs as you wish. It simply move to the next step if a step
319fails.
320
321Kernel command line can be customized globally with KBOOTPARAM or just in a boot
322entry for the type of board. They have different effective scopes.
323
324If no any board-specific configuration becomes effective on your board but it
325works on other boards of same product, you can run rmc tool to obtain
326fingerprint file on your board and compare it with fingerprint of a working
327board. It is possible they have different firmware versions and unluckily, some
328information for fingerprint changes between two versions. You can update BIOS
329on every board to the same BIOS version if it is feasible. Otherwise you have
330to treat them as two different type of boards. We could extend rmc design to
331allow multiple fingerprints in a board directory as a workaround.
332
333Issue: RMC reports error because it cannot find fingerprint when building image.
334
335Make sure you have a fingerprint file. Its name must be ended with '.fp'. You
336can put a fingerprint file in a board directory and provide data later.
337
338Issue: Any problems the above troubleshooting cannot help
339
340Please report it to us. Extra information like the type of your board or a dump
341file from dmidecode tool is helpful. We will investigate the problem and keep
342improving this feature.
343
344
345
346
347When you (don't) need RMC feature
348--------------------------------------------------------------------------------
349RMC feature is designed to as generic as possible, in order to support a large
350number of types of boards. And it shall be designed not to break things when it
351is disabled. These considerations help users to decide if they really need or
352enable it.
353
354If you are satisfied with a dedicated build target and image for each board in
355your development cycle (source, build, validation, release, etc), you don't need
356this feature.
357
358If you have a generic build for multiple type of boards and features supported
359by that build meet your needs to functionality on all of boards, you don't need
360to have this feature or you can disable it until you need to check in the first
361board's data, in order to apply a quirk or customization only for that board.
362
363If you want this feature but have concerns to see more and more boards' finger-
364prints and data in a generic project, you can have another layer to hold all of
365board-specific data to split them from a generic layer at source level. Another
366suggestion is always seeking chances not to clone or copy a common configuration
367to each board's directory.
368
369
370
371Thanks
372
373Jianxun Zhang <jianxun.zhang@linux.intel.com>
diff --git a/documentation/secureboot/README b/documentation/secureboot/README
deleted file mode 100644
index 3d5703bb..00000000
--- a/documentation/secureboot/README
+++ /dev/null
@@ -1,38 +0,0 @@
1Currently, only one implementation of Secure Boot is available out of the box,
2which is using a single signed EFI application to directly boot the kernel with
3an optional initramfs.
4
5This can be added to your build either through local.conf, or via your own
6custom image recipe.
7
8If you are adding it via local.conf, set the following variables:
9
10IMAGE_FEATURES += "secureboot"
11WKS_FILE = "generic-bootdisk.wks.in"
12SECURE_BOOT_SIGNING_KEY = "/path/to/your/signing/key"
13SECURE_BOOT_SIGNING_CERT = "/path/to/your/signing/cert"
14IMAGE_CLASSES += "uefi-comboapp"
15
16If working with an image recipe, you can inherit uefi-comboapp directly instead
17of using the IMAGE_CLASSES variable.
18
19The signing keys and certs can be created via openssl commands. Here's an
20example:
21openssl req -new -x509 -newkey rsa:2048 -subj "/CN=your-subject/" -keyout \
22your-key.key -out your-key.crt -days 365 -nodes -sha256
23openssl x509 -in your-key.crt -out your-key.cer -outform DER
24
25The .crt file is your SECURE_BOOT_SIGNING_CERT, and the .key file is your
26SECURE_BOOT_SIGNING_KEY.
27
28You should enroll the .crt key in your firmware under the PK, KEK, and DB
29options (methods are different depending on your firmware). If a key should ever
30become invalid, enroll it under DBX to blacklist it.
31
32The comboapp can be further manipulated in a number of ways. You can modify the
33kernel command line via the APPEND variable, you can change the default UUID via
34the DISK_SIGNATURE_UUID variable, and you can modify the contents of the
35initramfs via the INITRD_IMAGE or INITRD_LIVE variables.
36
37A simple Secure Boot enabled image used for testing can be viewed at:
38common/recipes-selftest/images/secureboot-selftest-image-signed.bb
diff --git a/documentation/submitting_patches.md b/documentation/submitting_patches.md
new file mode 100644
index 00000000..f36c4b08
--- /dev/null
+++ b/documentation/submitting_patches.md
@@ -0,0 +1,26 @@
1## Guidelines for submitting patches
2
3Please submit any patches against meta-intel BSPs to the
4[meta-intel mailing list](https://lists.yoctoproject.org/g/meta-intel)
5(email: meta-intel@lists.yoctoproject.org). Also, if your patches are
6available via a public git repository, please also include a URL to
7the repo and branch containing your patches as that makes it easier
8for maintainers to grab and test your patches.
9
10The patches should follow the suggestions outlined in the
11[Yocto Project and OpenEmbedded Contributor Guide](https://docs.yoctoproject.org/dev/contributor-guide/index.html).
12In addition, for any non-trivial patch, provide information about how you
13tested the patch, and for any non-trivial or non-obvious testing
14setup, provide details of that setup.
15
16Doing a quick 'git log' in meta-intel will provide you with many
17examples of good example commits if you have questions about any
18aspect of the preferred format.
19
20The meta-intel maintainers will do their best to review and/or pull in
21a patch or patch sets within 24 hours of the time it was posted. For
22larger and/or more involved patches and patch sets, the review process
23may take longer.
24
25Please see the [maintainers](../README.md#maintainers) section for the list of maintainers. It's also
26a good idea to cc: the maintainer, if applicable.
diff --git a/documentation/tested_hardware.md b/documentation/tested_hardware.md
new file mode 100644
index 00000000..48a25ab4
--- /dev/null
+++ b/documentation/tested_hardware.md
@@ -0,0 +1,24 @@
1## Tested Hardware
2
3The following undergo regular basic testing with their respective MACHINE types.
4
5- intel-corei7-64:
6 * Alder Lake-P
7 * Alder Lake-S
8 * Alder Lake-PS
9 * Elkhart Lake
10 * Metor Lake-P
11 * Raptor Lake-P
12 * Tiger Lake
13
14- intel-skylake-64:
15 * Alder Lake-P
16 * Alder Lake-S
17 * Alder Lake-PS
18 * Elkhart Lake
19 * Metor Lake-P
20 * Raptor Lake-P
21 * Tiger Lake
22
23- intel-core2-32:
24 * MinnowBoard Turbot
diff --git a/dynamic-layers/clang-layer/recipes-core/dnn/files/run-ptest b/dynamic-layers/clang-layer/recipes-core/dnn/files/run-ptest
new file mode 100755
index 00000000..82d4df58
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-core/dnn/files/run-ptest
@@ -0,0 +1,15 @@
1#!/bin/sh
2
3cd tests
4./api-c
5if [ $? -eq 0 ]; then
6 echo 'PASS: api-c'
7else
8 echo 'FAIL: api-c'
9fi
10./test_c_symbols-c
11if [ $? -eq 0 ]; then
12 echo 'PASS: test_c_symbols-c'
13else
14 echo 'FAIL: test_c_symbols-c'
15fi
diff --git a/dynamic-layers/clang-layer/recipes-core/dnn/onednn_3.4.bb b/dynamic-layers/clang-layer/recipes-core/dnn/onednn_3.4.bb
new file mode 100644
index 00000000..afea70df
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-core/dnn/onednn_3.4.bb
@@ -0,0 +1,57 @@
1HOMEPAGE = "https://www.oneapi.com"
2SUMMARY = "Deep Neural Network Library"
3DESCRIPTION = "This software is a user mode library that accelerates\
4deep-learning applications and frameworks on Intel architecture."
5LICENSE = "Apache-2.0 & BSD-3-Clause & BSL-1.0"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=3b64000f6e7d52516017622a37a94ce9 \
7 file://tests/gtests/gtest/LICENSE;md5=cbbd27594afd089daa160d3a16dd515a \
8 file://src/cpu/x64/xbyak/COPYRIGHT;md5=3b9bf048d063d54cdb28964db558bcc7 \
9 file://src/common/ittnotify/LICENSE.BSD;md5=e671ff178b24a95a382ba670503c66fb \
10 "
11SECTION = "lib"
12
13inherit pkgconfig cmake ptest
14
15DNN_BRANCH = "rls-v${@'.'.join(d.getVar('PV').split('.')[0:2])}"
16
17S = "${WORKDIR}/git"
18SRCREV = "ecd7fb6d5a0df6503d1691c1754a684b9c769c16"
19SRC_URI = "git://github.com/oneapi-src/oneDNN.git;branch=${DNN_BRANCH};protocol=https \
20 file://run-ptest \
21 "
22
23UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>(\d+(\.\d+)+))$"
24
25CVE_PRODUCT = "intel:math_kernel_library"
26
27COMPATIBLE_HOST = '(x86_64).*-linux'
28COMPATIBLE_HOST:libc-musl = 'null'
29
30EXTRA_OECMAKE += " \
31 -DDNNL_LIBRARY_TYPE=SHARED \
32 -DDNNL_BUILD_EXAMPLES=ON \
33 -DDNNL_BUILD_TESTS=ON \
34 -DDNNL_CPU_RUNTIME=OMP \
35 -DDNNL_ARCH_OPT_FLAGS="" \
36 -DCMAKE_SKIP_RPATH=ON \
37 -DONEDNN_BUILD_GRAPH=OFF \
38 "
39
40PACKAGECONFIG ??= "gpu"
41PACKAGECONFIG[gpu] = "-DDNNL_GPU_RUNTIME=OCL, , opencl-headers virtual/opencl-icd, intel-compute-runtime"
42
43do_install:append () {
44 install -d ${D}${bindir}/mkl-dnn/tests/benchdnn/inputs
45 install -m 0755 ${B}/tests/benchdnn/benchdnn ${D}${bindir}/mkl-dnn/tests/benchdnn
46 cp -r ${B}/tests/benchdnn/inputs/* ${D}${bindir}/mkl-dnn/tests/benchdnn/inputs
47}
48
49do_install_ptest () {
50 install -d ${D}${PTEST_PATH}/tests
51 install -m 0755 ${B}/tests/api-c ${D}${PTEST_PATH}/tests
52 install -m 0755 ${B}/tests/test_c_symbols-c ${D}${PTEST_PATH}/tests
53}
54
55PACKAGES =+ "${PN}-test"
56
57FILES:${PN}-test = "${bindir}/mkl-dnn/*"
diff --git a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/allow-to-find-cpp-generation-tool.patch b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/allow-to-find-cpp-generation-tool.patch
new file mode 100644
index 00000000..265fcfa2
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/allow-to-find-cpp-generation-tool.patch
@@ -0,0 +1,51 @@
1From a6361d635e5f3046853883f3ac06fb175116933c Mon Sep 17 00:00:00 2001
2From: Dongwon Kim <dongwon.kim@intel.com>
3Date: Sat, 21 Aug 2021 16:09:39 -0700
4Subject: [PATCH] Build not able to locate cpp_generation_tool.
5
6Upstream-Status: Inappropriate [oe specific]
7
8Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
9Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
10---
11 shared/source/built_ins/kernels/CMakeLists.txt | 10 +++++-----
12 1 file changed, 5 insertions(+), 5 deletions(-)
13
14diff --git a/shared/source/built_ins/kernels/CMakeLists.txt b/shared/source/built_ins/kernels/CMakeLists.txt
15index ed85a37c52..f7c9e79137 100644
16--- a/shared/source/built_ins/kernels/CMakeLists.txt
17+++ b/shared/source/built_ins/kernels/CMakeLists.txt
18@@ -107,9 +107,9 @@ function(compile_builtin core_type platform_it builtin bits builtin_options mode
19 )
20 add_custom_command(
21 OUTPUT ${OUTPUT_FILE_CPP}
22- COMMAND $<TARGET_FILE:cpp_generate_tool> --file ${BINARY_OUTPUT}.bin --output ${OUTPUT_FILE_CPP} --array ${mode}_${BASENAME} --device ${RELEASE_FILENAME}
23+ COMMAND cpp_generate_tool --file ${BINARY_OUTPUT}.bin --output ${OUTPUT_FILE_CPP} --array ${mode}_${BASENAME} --device ${RELEASE_FILENAME}
24 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
25- DEPENDS ${OUTPUT_FILES_BINARIES} $<TARGET_FILE:cpp_generate_tool>
26+ DEPENDS ${OUTPUT_FILES_BINARIES} cpp_generate_tool
27 )
28 list(APPEND BUILTINS_COMMANDS "${OUTPUT_FILE_CPP}")
29 else()
30@@ -159,9 +159,9 @@ function(generate_cpp_spirv builtin)
31 )
32 add_custom_command(
33 OUTPUT ${OUTPUT_FILE_CPP}
34- COMMAND $<TARGET_FILE:cpp_generate_tool> --file ${GENERATED_SPV_INPUT} --output ${OUTPUT_FILE_CPP} --array ${BASENAME}
35+ COMMAND cpp_generate_tool --file ${GENERATED_SPV_INPUT} --output ${OUTPUT_FILE_CPP} --array ${BASENAME}
36 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
37- DEPENDS ${GENERATED_SPV_INPUT} $<TARGET_FILE:cpp_generate_tool>
38+ DEPENDS ${GENERATED_SPV_INPUT} cpp_generate_tool
39 )
40 set(OUTPUT_LIST_CPP_FILES ${OUTPUT_LIST_CPP_FILES} ${OUTPUT_FILE_CPP} PARENT_SCOPE)
41 else()
42@@ -277,4 +277,4 @@ if(NOT "${OUTPUT_LIST_CPP_FILES}" STREQUAL "")
43 )
44 endif()
45
46-apply_macro_for_each_core_type("SUPPORTED")
47\ No newline at end of file
48+apply_macro_for_each_core_type("SUPPORTED")
49--
502.43.2
51
diff --git a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/disable-werror.patch b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/disable-werror.patch
new file mode 100644
index 00000000..20d9b847
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/disable-werror.patch
@@ -0,0 +1,16 @@
1Upstream-Status: Inappropriate
2Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
3
4diff --git a/CMakeLists.txt b/CMakeLists.txt
5index d52e089778..bc0cf35014 100644
6--- a/CMakeLists.txt
7+++ b/CMakeLists.txt
8@@ -727,7 +727,7 @@ if(NOT MSVC)
9 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-noexcept-type") # Added for gtest
10 endif()
11 endif()
12- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Werror=vla")
13+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=vla")
14
15 if(USE_SANITIZE_UB)
16 check_cxx_compiler_flag(-fsanitize=undefined COMPILER_SUPPORTS_UNDEFINED_BEHAVIOR_SANITIZER)
diff --git a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/external-ocloc.patch b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/external-ocloc.patch
new file mode 100644
index 00000000..5f93b7b6
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime/external-ocloc.patch
@@ -0,0 +1,40 @@
1From 1f58c22992ddea4167b01b44448528de427f50d5 Mon Sep 17 00:00:00 2001
2From: Dongwon Kim <dongwon.kim@intel.com>
3Date: Wed, 2 Mar 2022 15:52:45 -0800
4Subject: [PATCH] external ocloc
5
6Upstream-Status: Inappropriate
7
8Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
9---
10 cmake/ocloc_cmd_prefix.cmake | 14 ++++++++------
11 1 file changed, 8 insertions(+), 6 deletions(-)
12
13diff --git a/cmake/ocloc_cmd_prefix.cmake b/cmake/ocloc_cmd_prefix.cmake
14index 2b44330831..03067c9df0 100644
15--- a/cmake/ocloc_cmd_prefix.cmake
16+++ b/cmake/ocloc_cmd_prefix.cmake
17@@ -4,12 +4,14 @@
18 # SPDX-License-Identifier: MIT
19 #
20
21-if(WIN32)
22- set(ocloc_cmd_prefix ocloc)
23-else()
24- if(DEFINED NEO__IGC_LIBRARY_PATH)
25- set(ocloc_cmd_prefix ${CMAKE_COMMAND} -E env "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${NEO__IGC_LIBRARY_PATH}:$<TARGET_FILE_DIR:ocloc_lib>" $<TARGET_FILE:ocloc>)
26+if(NOT DEFINED ocloc_cmd_prefix)
27+ if(WIN32)
28+ set(ocloc_cmd_prefix ocloc)
29 else()
30- set(ocloc_cmd_prefix ${CMAKE_COMMAND} -E env "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$<TARGET_FILE_DIR:ocloc_lib>" $<TARGET_FILE:ocloc>)
31+ if(DEFINED NEO__IGC_LIBRARY_PATH)
32+ set(ocloc_cmd_prefix LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${NEO__IGC_LIBRARY_PATH}:$<TARGET_FILE_DIR:ocloc_lib> $<TARGET_FILE:ocloc>)
33+ else()
34+ set(ocloc_cmd_prefix LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$<TARGET_FILE_DIR:ocloc_lib> $<TARGET_FILE:ocloc>)
35+ endif()
36 endif()
37 endif()
38--
392.37.3
40
diff --git a/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_24.05.28454.6.bb b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_24.05.28454.6.bb
new file mode 100644
index 00000000..60125171
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/compute-runtime/intel-compute-runtime_24.05.28454.6.bb
@@ -0,0 +1,64 @@
1SUMMARY = "The Intel(R) Graphics Compute Runtime for OpenCL(TM)"
2DESCRIPTION = "The Intel(R) Graphics Compute Runtime for OpenCL(TM) \
3is an open source project to converge Intel's development efforts \
4on OpenCL(TM) compute stacks supporting the GEN graphics hardware \
5architecture."
6
7LICENSE = "MIT & Apache-2.0"
8LIC_FILES_CHKSUM = "file://LICENSE.md;md5=eca6ec6997e18db166db7109cdbe611c \
9 file://third_party/opencl_headers/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
10
11SRC_URI = "git://github.com/intel/compute-runtime.git;protocol=https;branch=releases/24.05 \
12 file://disable-werror.patch \
13 file://allow-to-find-cpp-generation-tool.patch \
14 file://external-ocloc.patch \
15 "
16
17SRCREV = "23a9725e62c8181193c90e5e5207507a1f136587"
18
19S = "${WORKDIR}/git"
20
21DEPENDS += " intel-graphics-compiler gmmlib libva qemu-native"
22
23RDEPENDS:${PN} += " intel-graphics-compiler gmmlib"
24
25inherit cmake pkgconfig qemu
26
27COMPATIBLE_HOST = '(x86_64).*-linux'
28COMPATIBLE_HOST:libc-musl = "null"
29
30EXTRA_OECMAKE = " \
31 -DIGC_DIR=${STAGING_INCDIR}/igc \
32 -DBUILD_TYPE=Release \
33 -DSKIP_UNIT_TESTS=1 \
34 -DCCACHE_ALLOWED=FALSE \
35 -DNEO_DISABLE_LD_LLD=ON \
36 -DNEO_DISABLE_LD_GOLD=ON \
37 "
38
39EXTRA_OECMAKE:append:class-target = " \
40 -Docloc_cmd_prefix=ocloc \
41 -DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper \
42 "
43
44PACKAGECONFIG ??= ""
45PACKAGECONFIG[levelzero] = "-DBUILD_WITH_L0=ON, -DBUILD_WITH_L0=OFF, level-zero"
46
47do_configure:prepend:class-target () {
48 # Write out a qemu wrapper that will be used by cmake.
49 qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${B}/bin'),d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}"
50 cat > ${WORKDIR}/qemuwrapper << EOF
51#!/bin/sh
52$qemu_binary "\$@"
53EOF
54 chmod +x ${WORKDIR}/qemuwrapper
55}
56
57FILES:${PN} += " \
58 ${libdir}/intel-opencl/libigdrcl.so \
59 ${libdir}/libocloc.so \
60 "
61
62FILES:${PN}-dev = "${includedir}"
63
64UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-BiF-CMakeLists.txt-remove-opt-from-DEPENDS.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-BiF-CMakeLists.txt-remove-opt-from-DEPENDS.patch
new file mode 100644
index 00000000..377081fd
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-BiF-CMakeLists.txt-remove-opt-from-DEPENDS.patch
@@ -0,0 +1,35 @@
1From 3d71670f8ad5b54d434c2f5f71713bb1d5433ae4 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Tue, 12 Oct 2021 23:46:42 +0800
4Subject: [PATCH] BiF/CMakeLists.txt: remove opt from DEPENDS
5
6Otherwise it starts failing with:
7
8| ninja: error: 'IGC/VectorCompiler/lib/BiF/opt', needed by 'IGC/VectorCompiler/lib/BiF/VCBiFPrintfOCL32.opt.bc', missing and no known rule to make it
9
10We don't need to explicitly make sure opt is built when
11using prebuilt binaries.
12
13Upstream-Status: Inappropriate
14
15Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
16---
17 IGC/VectorCompiler/lib/BiF/cmake/Functions.cmake | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20diff --git a/IGC/VectorCompiler/lib/BiF/cmake/Functions.cmake b/IGC/VectorCompiler/lib/BiF/cmake/Functions.cmake
21index d20d7f887..882e09fea 100644
22--- a/IGC/VectorCompiler/lib/BiF/cmake/Functions.cmake
23+++ b/IGC/VectorCompiler/lib/BiF/cmake/Functions.cmake
24@@ -109,7 +109,7 @@ function(vc_build_bif TARGET RES_FILE CMCL_SRC_PATH BIF_NAME PTR_BIT_SIZE)
25 COMMENT "vc_build_bif: Translating CMCL builtins: ${BIF_CLANG_BC_NAME_FINAL} -> ${BIF_OPT_BC_NAME}"
26 COMMAND CMCLTranslatorTool -o ${BIF_CMCL_BC_NAME} ${BIF_CLANG_BC_NAME_FINAL}
27 COMMAND ${LLVM_OPT_EXE} ${IGC_LLVM_DEPENDENT_OPT_FLAGS} --O2 -o ${BIF_OPT_BC_NAME} ${BIF_CMCL_BC_NAME}
28- DEPENDS CMCLTranslatorTool ${LLVM_OPT_EXE} ${BIF_CLANG_BC_PATH_FINAL}
29+ DEPENDS CMCLTranslatorTool ${BIF_CLANG_BC_PATH_FINAL}
30 BYPRODUCTS ${BIF_OPT_BC_PATH}
31 SOURCES ${CMCL_SRC_PATH})
32 set(${RES_FILE} ${BIF_OPT_BC_NAME} PARENT_SCOPE)
33--
342.43.2
35
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-external-SPIRV-Tools-change-path-to-tools-and-header.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-external-SPIRV-Tools-change-path-to-tools-and-header.patch
new file mode 100644
index 00000000..dca75e22
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-external-SPIRV-Tools-change-path-to-tools-and-header.patch
@@ -0,0 +1,31 @@
1From e69a3181482e5f442756a61c7b683914072884f1 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Mon, 9 Jan 2023 11:43:05 +0800
4Subject: [PATCH] external/SPIRV-Tools: change path to tools and headers
5
6We clone the SPIRV headers and tools in a different directory to ensure
7file path substitutions take place.
8
9Upstream-Status: Inappropriate
10
11Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
12
13---
14 external/SPIRV-Tools/CMakeLists.txt | 4 ++--
15 1 file changed, 2 insertions(+), 2 deletions(-)
16
17diff --git a/external/SPIRV-Tools/CMakeLists.txt b/external/SPIRV-Tools/CMakeLists.txt
18index 9afa5746c..7ca24d5dc 100644
19--- a/external/SPIRV-Tools/CMakeLists.txt
20+++ b/external/SPIRV-Tools/CMakeLists.txt
21@@ -43,8 +43,8 @@ else() #By default use build from sources
22 message(STATUS "[SPIRV-Tools] : Building from source")
23 message(STATUS "[SPIRV-Tools] : Current source dir: ${CMAKE_CURRENT_SOURCE_DIR}")
24
25- set(SPIRV-Headers_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../SPIRV-Headers") # used in subdirectory
26- set(SPIRV-Tools_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../SPIRV-Tools")
27+ set(SPIRV-Headers_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../SPIRV-Headers") # used in subdirectory
28+ set(SPIRV-Tools_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../SPIRV-Tools")
29
30 set(SPIRV-Tools_OUTPUT_DIR "${IGC_OPTION__OUTPUT_DIR}/external/SPIRV-Tools/build")
31 set(IGC_BUILD__SPIRV-Headers_DIR "${SPIRV-Headers_SOURCE_DIR}")
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-fix-tblgen.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-fix-tblgen.patch
new file mode 100644
index 00000000..39443931
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0001-fix-tblgen.patch
@@ -0,0 +1,24 @@
1From 5648568e597acd0fed82aac3e6aef0f95a1b78d1 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Thu, 19 May 2022 22:50:09 +0800
4Subject: [PATCH] fix tblgen
5
6Upstream-Status: Inappropriate [OE specific]
7
8---
9 IGC/cmake/igc_llvm.cmake | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12diff --git a/IGC/cmake/igc_llvm.cmake b/IGC/cmake/igc_llvm.cmake
13index 10322533c..9020cb3c8 100644
14--- a/IGC/cmake/igc_llvm.cmake
15+++ b/IGC/cmake/igc_llvm.cmake
16@@ -52,7 +52,7 @@ else()
17 set(LLVM_OPT_EXE "opt" CACHE STRING "")
18
19 set(LLVM_TABLEGEN_EXE "llvm-tblgen")
20- if(CMAKE_CROSSCOMPILING)
21+ if(TRUE)
22 if(DEFINED LLVM_TABLEGEN)
23 set(LLVM_TABLEGEN_EXE ${LLVM_TABLEGEN})
24 else()
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/0003-Improve-Reproducibility-for-src-package.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0003-Improve-Reproducibility-for-src-package.patch
new file mode 100644
index 00000000..650130a8
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/0003-Improve-Reproducibility-for-src-package.patch
@@ -0,0 +1,34 @@
1From 0559332abd04b6c8bc70171d201f43d2e4735336 Mon Sep 17 00:00:00 2001
2From: Lee Chee Yang <chee.yang.lee@intel.com>
3Date: Wed, 2 Sep 2020 08:28:35 +0800
4Subject: [PATCH] Improve Reproducibility for src package
5
6Improve reproducibility for intel-graphics-compiler-src package.
7needs to pass build path as environment variable to the build.
8this only works on bison 3.7 onward, hence check for bison version
9before adding the flags.
10Upstream-Status: Inappropriate [applying --file-prefix-map in such way does not work for upstream]
11Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
12
13---
14 visa/CMakeLists.txt | 7 +++++--
15 1 file changed, 5 insertions(+), 2 deletions(-)
16
17diff --git a/visa/CMakeLists.txt b/visa/CMakeLists.txt
18index 6be467587..930c386a6 100644
19--- a/visa/CMakeLists.txt
20+++ b/visa/CMakeLists.txt
21@@ -123,8 +123,11 @@ endif()
22 set(bison_output_file ${CMAKE_CURRENT_BINARY_DIR}/CISA.tab.cpp)
23 set(flex_output_file ${CMAKE_CURRENT_BINARY_DIR}/lex.CISA.cpp)
24
25-BISON_TARGET(CISAParser CISA.y ${bison_output_file} COMPILE_FLAGS "-vt -p CISA")
26-FLEX_TARGET(CISAScanner CISA.l ${flex_output_file} COMPILE_FLAGS "-PCISA ${WIN_FLEX_FLAG}")
27+if(BISON_VERSION VERSION_GREATER_EQUAL "3.7.0")
28+ set(BISON_EXTRA_FLAGS " --file-prefix-map=$ENV{B}=/igc/ ")
29+endif()
30+BISON_TARGET(CISAParser CISA.y ${bison_output_file} COMPILE_FLAGS "-l -vt -p CISA ${BISON_EXTRA_FLAGS} ")
31+FLEX_TARGET(CISAScanner CISA.l ${flex_output_file} COMPILE_FLAGS "-PCISA -L ${WIN_FLEX_FLAG} ")
32 ADD_FLEX_BISON_DEPENDENCY(CISAScanner CISAParser)
33 set(CISAScanner_dependencies)
34
diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.15985.7.bb b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.15985.7.bb
new file mode 100644
index 00000000..96d828b6
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.15985.7.bb
@@ -0,0 +1,75 @@
1SUMMARY = "The Intel(R) Graphics Compiler for OpenCL(TM)"
2DESCRIPTION = "The Intel(R) Graphics Compiler for OpenCL(TM) is an \
3llvm based compiler for OpenCL(TM) targeting Intel Gen graphics \
4hardware architecture."
5
6LICENSE = "MIT & Apache-2.0"
7LIC_FILES_CHKSUM = "file://IGC/BiFModule/Implementation/ExternalLibraries/libclc/LICENSE.TXT;md5=311cfc1a5b54bab8ed34a0b5fba4373e \
8 file://LICENSE.md;md5=488d74376edf2765f6e78d271543dde3 \
9 file://NOTICES.txt;md5=7f4fbc3eb2c34807465e63b1ec3c9d1a"
10
11SRC_URI = "git://github.com/intel/intel-graphics-compiler.git;protocol=https;name=igc;branch=releases/igc-1.0.15985 \
12 git://github.com/intel/vc-intrinsics.git;protocol=https;destsuffix=git/vc-intrinsics;name=vc;nobranch=1 \
13 git://github.com/KhronosGroup/SPIRV-Tools.git;protocol=https;destsuffix=git/SPIRV-Tools;name=spirv-tools;branch=main \
14 git://github.com/KhronosGroup/SPIRV-Headers.git;protocol=https;destsuffix=git/SPIRV-Headers;name=spirv-headers;branch=main \
15 file://0003-Improve-Reproducibility-for-src-package.patch \
16 file://0001-BiF-CMakeLists.txt-remove-opt-from-DEPENDS.patch \
17 file://0001-external-SPIRV-Tools-change-path-to-tools-and-header.patch \
18 "
19
20SRC_URI:append:class-native = " file://0001-fix-tblgen.patch"
21
22SRCREV_igc = "6cc111d262e1c3abcf4bc6b6d8a589ebf821a5c0"
23SRCREV_vc = "da892e1982b6c25b9a133f85b4ac97142d8a3def"
24SRCREV_spirv-tools = "f0cc85efdbbe3a46eae90e0f915dc1509836d0fc"
25SRCREV_spirv-headers = "cca08c63cefa129d082abca0302adcb81610b465"
26
27SRCREV_FORMAT = "igc_vc_spirv-tools_spirv-headers"
28
29# Used to replace with relative path in reproducibility patch
30export B
31
32S = "${WORKDIR}/git"
33
34inherit cmake pkgconfig qemu python3native
35
36CXXFLAGS:append = " -Wno-error=nonnull"
37
38COMPATIBLE_HOST = '(x86_64).*-linux'
39COMPATIBLE_HOST:libc-musl = "null"
40
41DEPENDS += " flex-native bison-native clang clang-cross-x86_64 opencl-clang qemu-native python3-mako-native"
42
43RDEPENDS:${PN} += "opencl-clang"
44
45PACKAGECONFIG ??= "vc"
46PACKAGECONFIG[vc] = "-DIGC_BUILD__VC_ENABLED=ON -DIGC_OPTION__LINK_KHRONOS_SPIRV_TRANSLATOR=ON -DIGC_OPTION__SPIRV_TRANSLATOR_MODE=Prebuilds,-DIGC_BUILD__VC_ENABLED=OFF,"
47
48EXTRA_OECMAKE = " \
49 -DIGC_OPTION__LLVM_PREFERRED_VERSION=${LLVMVERSION} \
50 -DVC_INTRINSICS_SRC="${S}/vc-intrinsics" \
51 -DIGC_OPTION__LLVM_MODE=Prebuilds \
52 -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \
53 -DLLVM_LINK_EXE=${STAGING_BINDIR_NATIVE}/llvm-link \
54 -DCLANG_EXE=${STAGING_BINDIR_NATIVE}/clang \
55 -DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper \
56 "
57
58do_configure:prepend:class-target () {
59 # Write out a qemu wrapper that will be used by cmake.
60 qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}"
61 cat > ${WORKDIR}/qemuwrapper << EOF
62#!/bin/sh
63$qemu_binary "\$@"
64EOF
65 chmod +x ${WORKDIR}/qemuwrapper
66}
67
68UPSTREAM_CHECK_GITTAGREGEX = "^igc-(?P<pver>(?!19\..*)\d+(\.\d+)+)$"
69
70FILES:${PN} += " \
71 ${libdir}/igc/NOTICES.txt \
72 "
73
74# libigc.so contains buildpaths
75INSANE_SKIP:${PN} += "buildpaths"
diff --git a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0001-cl_headers-CMakeLists.txt-use-clang-from-native-sysr.patch b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0001-cl_headers-CMakeLists.txt-use-clang-from-native-sysr.patch
new file mode 100644
index 00000000..031a77c7
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0001-cl_headers-CMakeLists.txt-use-clang-from-native-sysr.patch
@@ -0,0 +1,49 @@
1From 5aea653e611b59c70e529a1bd71885a509831557 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Tue, 1 Aug 2023 11:15:31 +0800
4Subject: [PATCH] cl_headers/CMakeLists.txt: use clang from native sysroot
5
6Allow clang to be found in target sysroot for target builds and dont try
7to compile cross binaries, we do that ourselves.
8
9Upstream-Status: Inappropriate [oe-specific]
10Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
11---
12 CMakeLists.txt | 8 ++++----
13 cl_headers/CMakeLists.txt | 2 +-
14 2 files changed, 5 insertions(+), 5 deletions(-)
15
16diff --git a/CMakeLists.txt b/CMakeLists.txt
17index 5864009..60ba39e 100644
18--- a/CMakeLists.txt
19+++ b/CMakeLists.txt
20@@ -35,10 +35,10 @@ set(CMAKE_MODULE_PATH
21
22 include(CMakeFunctions)
23
24-if(CMAKE_CROSSCOMPILING AND OPENCL_CLANG_BUILD_EXTERNAL)
25- include(CrossCompile)
26- llvm_create_cross_target(${PROJECT_NAME} NATIVE "" Release)
27-endif()
28+#if(CMAKE_CROSSCOMPILING AND OPENCL_CLANG_BUILD_EXTERNAL)
29+# include(CrossCompile)
30+# llvm_create_cross_target(${PROJECT_NAME} NATIVE "" Release)
31+#endif()
32
33 if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
34 set(USE_PREBUILT_LLVM ON)
35diff --git a/cl_headers/CMakeLists.txt b/cl_headers/CMakeLists.txt
36index 16cabb7..4423536 100644
37--- a/cl_headers/CMakeLists.txt
38+++ b/cl_headers/CMakeLists.txt
39@@ -1,6 +1,6 @@
40 set(CL_HEADERS_LIB cl_headers)
41 if(USE_PREBUILT_LLVM)
42- find_program(CLANG_COMMAND clang PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
43+ find_program(CLANG_COMMAND clang PATHS ${LLVM_TOOLS_BINARY_DIR})
44 else()
45 set(CLANG_COMMAND $<TARGET_FILE:clang>)
46 endif()
47--
482.37.3
49
diff --git a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0002-Request-native-clang-only-when-cross-compiling-464.patch b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0002-Request-native-clang-only-when-cross-compiling-464.patch
new file mode 100644
index 00000000..2f1814f8
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/files/0002-Request-native-clang-only-when-cross-compiling-464.patch
@@ -0,0 +1,60 @@
1From 43c806ef321b1f677a49d28c89fb7ffecf539c2d Mon Sep 17 00:00:00 2001
2From: Tim Creech <timothy.m.creech@intel.com>
3Date: Wed, 28 Jun 2023 03:45:51 -0400
4Subject: [PATCH 2/2] Request native clang only when cross-compiling (#464)
5
6* Request native clang only when cross-compiling
7
8LLVM_USE_HOST_TOOLS may be set if LLVM is configured with
9LLVM_OPTIMIZED_TABLEGEN, which does not necessarily indicate
10cross-compilation or that clang will only execute on the target.
11
12By checking that CMAKE_CROSSCOMPILING is set, we ensure that we only
13build/use clang again if necessary for host execution.
14
15* fixup: CMAKE_CROSSCOMPILING implies LLVM_USE_HOST_TOOLS
16
17Co-authored-by: Wenju He <wenju.he@intel.com>
18
19* fixup: also use CMAKE_CROSSCOMPILING in top-level CMakeLists.txt
20
21---------
22
23Co-authored-by: Wenju He <wenju.he@intel.com>
24
25Upstream-Status: Backport [https://github.com/intel/opencl-clang/commit/53843eee13cfb2357919ee02714a43bef1af0f86]
26Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
27---
28 CMakeLists.txt | 2 +-
29 cl_headers/CMakeLists.txt | 2 +-
30 2 files changed, 2 insertions(+), 2 deletions(-)
31
32diff --git a/CMakeLists.txt b/CMakeLists.txt
33index e772de9..5864009 100644
34--- a/CMakeLists.txt
35+++ b/CMakeLists.txt
36@@ -35,7 +35,7 @@ set(CMAKE_MODULE_PATH
37
38 include(CMakeFunctions)
39
40-if(LLVM_USE_HOST_TOOLS AND OPENCL_CLANG_BUILD_EXTERNAL)
41+if(CMAKE_CROSSCOMPILING AND OPENCL_CLANG_BUILD_EXTERNAL)
42 include(CrossCompile)
43 llvm_create_cross_target(${PROJECT_NAME} NATIVE "" Release)
44 endif()
45diff --git a/cl_headers/CMakeLists.txt b/cl_headers/CMakeLists.txt
46index 18296c2..16cabb7 100644
47--- a/cl_headers/CMakeLists.txt
48+++ b/cl_headers/CMakeLists.txt
49@@ -4,7 +4,7 @@ if(USE_PREBUILT_LLVM)
50 else()
51 set(CLANG_COMMAND $<TARGET_FILE:clang>)
52 endif()
53-if(LLVM_USE_HOST_TOOLS AND NOT OPENCL_CLANG_BUILD_EXTERNAL)
54+if(CMAKE_CROSSCOMPILING AND NOT OPENCL_CLANG_BUILD_EXTERNAL)
55 build_native_tool(clang CLANG_COMMAND)
56 endif()
57
58--
592.37.3
60
diff --git a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang.inc b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang.inc
new file mode 100644
index 00000000..31a3fb21
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang.inc
@@ -0,0 +1,34 @@
1SUMMARY = "Common clang is a thin wrapper library around clang"
2DESCRIPTION = "Common clang has OpenCL-oriented API and is capable \
3 to compile OpenCL C kernels to SPIR-V modules."
4
5LICENSE = "NCSA"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=e8a15bf1416762a09ece07e44c79118c"
7
8SRC_URI = "git://github.com/intel/opencl-clang.git;branch=${BRANCH};protocol=https \
9 file://0002-Request-native-clang-only-when-cross-compiling-464.patch \
10 file://0001-cl_headers-CMakeLists.txt-use-clang-from-native-sysr.patch \
11 "
12S = "${WORKDIR}/git"
13
14inherit cmake
15DEPENDS += "clang"
16DEPENDS:append:class-target = " opencl-clang-native"
17
18COMPATIBLE_HOST = '(x86_64).*-linux'
19COMPATIBLE_HOST:libc-musl = "null"
20
21DEPENDS += " spirv-llvm-translator"
22
23EXTRA_OECMAKE += "\
24 -DLLVM_TABLEGEN_EXE=${STAGING_BINDIR_NATIVE}/llvm-tblgen \
25 -DCMAKE_SKIP_RPATH=TRUE \
26 -DPREFERRED_LLVM_VERSION=${LLVMVERSION} \
27 "
28
29do_install:append:class-native() {
30 install -d ${D}${bindir}
31 install -m 0755 ${B}/bin/linux_resource_linker ${D}${bindir}/
32}
33
34BBCLASSEXTEND = "native nativesdk"
diff --git a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_14.0.0.bb b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_14.0.0.bb
new file mode 100644
index 00000000..7e56af75
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_14.0.0.bb
@@ -0,0 +1,5 @@
1require opencl-clang.inc
2
3SRCREV = "980f1691c5babcf824ee10375a04a0d0c5d7d44a"
4
5BRANCH = "ocl-open-140"
diff --git a/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_15.0.0.bb b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_15.0.0.bb
new file mode 100644
index 00000000..e946c31c
--- /dev/null
+++ b/dynamic-layers/clang-layer/recipes-opencl/opencl-clang/opencl-clang_15.0.0.bb
@@ -0,0 +1,5 @@
1require opencl-clang.inc
2
3SRCREV = "60fd799cc58755c16d951f9ebfde6d0f9b8554dd"
4
5BRANCH = "ocl-open-150"
diff --git a/dynamic-layers/meta-python/recipes-opencv/dldt/openvino-model-optimizer_2024.0.0.bb b/dynamic-layers/meta-python/recipes-opencv/dldt/openvino-model-optimizer_2024.0.0.bb
new file mode 100644
index 00000000..70177c28
--- /dev/null
+++ b/dynamic-layers/meta-python/recipes-opencv/dldt/openvino-model-optimizer_2024.0.0.bb
@@ -0,0 +1,33 @@
1SUMMARY = "OpenVINO Model Optimzer"
2DESCRIPTION = "Model Optimizer is a cross-platform command-line tool that \
3facilitates the transition between the training and deployment \
4environment, performs static model analysis, and adjusts deep \
5learning models for optimal execution on end-point target devices."
6HOMEPAGE = "https://01.org/openvinotoolkit"
7
8SRC_URI = "git://github.com/openvinotoolkit/openvino.git;protocol=https;branch=releases/2024/0;lfs=0 \
9 "
10SRCREV = "34caeefd07800b59065345d651949efbe8ab6649"
11
12LICENSE = "Apache-2.0"
13LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
14
15CVE_PRODUCT = "intel:openvino"
16S = "${WORKDIR}/git"
17
18inherit setuptools3
19
20SETUPTOOLS_SETUP_PATH = "${WORKDIR}/git/tools/mo"
21
22RDEPENDS:${PN} += " \
23 python3-defusedxml \
24 python3-fastjsonschema \
25 python3-networkx \
26 python3-numpy \
27 python3-protobuf \
28 python3-requests \
29 python3-urllib3 \
30 bash \
31 "
32
33UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+\.\d+\.\d+))$"
diff --git a/dynamic-layers/openembedded-layer/recipes-bsp/amt/lms_2406.0.0.0.bb b/dynamic-layers/openembedded-layer/recipes-bsp/amt/lms_2406.0.0.0.bb
new file mode 100644
index 00000000..bdf32576
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-bsp/amt/lms_2406.0.0.0.bb
@@ -0,0 +1,44 @@
1SUMMARY = "Intel(R) Local Managability Service"
2DESCRIPTION = "Intel Local Manageability Service allows applications \
3to access the Intel Active Management Technology (AMT) firmware via \
4the Intel Management Engine Interface (MEI)."
5
6LICENSE = "Apache-2.0"
7LIC_FILES_CHKSUM = "file://COPYING;md5=2ee41112a44fe7014dce33e26468ba93"
8
9COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
10
11COMPATIBLE_HOST:libc-musl = "null"
12
13inherit cmake systemd features_check python3native
14
15DEPENDS = "metee ace xerces-c libnl libxml2 glib-2.0 glib-2.0-native pkgconfig-native python3-packaging-native"
16
17# Enable either connman or networkmanager or none but not both.
18PACKAGECONFIG ??= "connman"
19PACKAGECONFIG[connman] = "-DNETWORK_CN=ON, -DNETWORK_CN=OFF, connman"
20PACKAGECONFIG[networkmanager] = "-DNETWORK_NM=ON, -DNETWORK_NM=OFF, networkmanager"
21
22REQUIRED_DISTRO_FEATURES= "systemd"
23
24FILES:${PN} += "${datadir}/dbus-1/system-services/*.service"
25
26S = "${WORKDIR}/git"
27
28SYSTEMD_SERVICE:${PN} = "lms.service"
29
30SRC_URI = "git://github.com/intel/lms.git;branch=master;protocol=https \
31 "
32SRCREV = "388f115b2aeb3ea11499971c65f828daefd32c47"
33
34do_install:append() {
35 install -d ${D}${sysconfdir}/lms
36 install -d ${D}${systemd_system_unitdir}
37 install -m 0644 ${B}/UNS/lms.service ${D}${systemd_system_unitdir}
38 install -d ${D}${sysconfdir}/udev/rules.d
39 install -m 0644 ${S}/UNS/linux_scripts/70-mei-wdt.rules ${D}${sysconfdir}/udev/rules.d/70-mei-wdt.rules
40}
41
42RDEPENDS:${PN} += "ace"
43
44CVE_STATUS[CVE-2018-1000535] = "cpe-incorrect: This CVE is for a different LMS - Lan Management System."
diff --git a/dynamic-layers/openembedded-layer/recipes-bsp/thermald/files/0001-Makefile-Fix-build-Issue.patch b/dynamic-layers/openembedded-layer/recipes-bsp/thermald/files/0001-Makefile-Fix-build-Issue.patch
new file mode 100644
index 00000000..270cc84d
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-bsp/thermald/files/0001-Makefile-Fix-build-Issue.patch
@@ -0,0 +1,39 @@
1From c4c049481d48f33319b1d04cad56d622c4eed65f Mon Sep 17 00:00:00 2001
2From: Yogesh Tyagi <yogesh.tyagi@intel.com>
3Date: Mon, 11 Mar 2024 13:13:32 +0800
4Subject: [PATCH] Makefile: Fix build Issue
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9In case build directory is different from source, make sure make is able to find the correct input files.
10
11Fixes:
12| dbus-binding-tool --prefix=thd_dbus_interface --mode=glib-server --output=thd_dbus_interface.h ../git/src/thd_dbus_interface.xml
13| glib-compile-resources --generate-source thermald-resource.gresource.xml
14| Failed to open file “thermald-resource.gresource.xmlâ€: No such file or directory
15
16
17Upstream-Status: Submitted
18https://github.com/intel/thermal_daemon/pull/436
19
20Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com>
21---
22 Makefile.am | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
24
25diff --git a/Makefile.am b/Makefile.am
26index a0c051a..772e280 100644
27--- a/Makefile.am
28+++ b/Makefile.am
29@@ -95,6 +95,6 @@ thd_dbus_interface.h: $(top_srcdir)/src/thd_dbus_interface.xml
30 $(AM_V_GEN) dbus-binding-tool --prefix=thd_dbus_interface --mode=glib-server --output=$@ $<
31
32 thermald-resource.c: $(top_srcdir)/thermald-resource.gresource.xml
33- $(AM_V_GEN) glib-compile-resources --generate-source thermald-resource.gresource.xml
34+ $(AM_V_GEN) glib-compile-resources --generate-source --sourcedir=${top_srcdir} $<
35
36 CLEANFILES = $(BUILT_SOURCES)
37--
382.34.1
39
diff --git a/recipes-bsp/thermald/thermald_1.7.1.bb b/dynamic-layers/openembedded-layer/recipes-bsp/thermald/thermald_2.5.6.bb
index b2e86368..df242cdf 100644
--- a/recipes-bsp/thermald/thermald_1.7.1.bb
+++ b/dynamic-layers/openembedded-layer/recipes-bsp/thermald/thermald_2.5.6.bb
@@ -6,29 +6,38 @@ compensation using available cooling methods."
6 6
7HOMEPAGE = "https://github.com/01org/thermal_daemon" 7HOMEPAGE = "https://github.com/01org/thermal_daemon"
8 8
9DEPENDS = "dbus dbus-glib dbus-glib-native libxml2 glib-2.0 glib-2.0-native" 9DEPENDS = "dbus dbus-glib dbus-glib-native libxml2 glib-2.0 glib-2.0-native upower libevdev"
10DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd','',d)}" 10DEPENDS += "autoconf-archive-native"
11DEPENDS_append_libc-musl = " argp-standalone" 11
12DEPENDS_append_toolchain-clang = " openmp" 12LICENSE = "GPL-2.0-only"
13LICENSE = "GPLv2"
14LIC_FILES_CHKSUM = "file://COPYING;md5=ea8831610e926e2e469075b52bf08848" 13LIC_FILES_CHKSUM = "file://COPYING;md5=ea8831610e926e2e469075b52bf08848"
15 14
16SRC_URI = "git://github.com/intel/thermal_daemon/ \ 15SRC_URI = "git://github.com/intel/thermal_daemon/;branch=master;protocol=https \
17 file://0001-Include-poll.h-instead-of-sys-poll.h.patch \ 16 file://0001-Makefile-Fix-build-Issue.patch \
18 file://0002-Use-correct-format-specifier-for-X32.patch \
19 " 17 "
20SRCREV = "c0d224b7b5cf62d384f5ad0a29bfaaba4bdc4ac1" 18
19SRCREV = "3990ce2391e5c07293758c056e09e4f2453691b4"
21S = "${WORKDIR}/git" 20S = "${WORKDIR}/git"
22 21
23inherit pkgconfig autotools systemd 22inherit pkgconfig autotools systemd gtk-doc
23
24# gtkdocsize runs before autotools do_configure and it copies gtk-doc.m4 and fails
25# to copy becuase there is no m4 dir yet.
26do_configure:prepend () {
27 mkdir -p ${S}/m4
28}
29
30EXTRA_OECONF = " \
31 --with-systemdsystemunitdir=${systemd_system_unitdir} \
32 "
24 33
25FILES_${PN} += "${datadir}/dbus-1/system-services/*.service" 34FILES:${PN} += "${datadir}/dbus-1"
26 35
27SYSTEMD_SERVICE_${PN} = "thermald.service" 36SYSTEMD_SERVICE:${PN} = "thermald.service"
28 37
29COMPATIBLE_HOST = '(i.86|x86_64).*-linux' 38COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
30 39
31CONFFILES_${PN} = " \ 40CONFFILES:${PN} = " \
32 ${sysconfdir}/thermald/thermal-conf.xml \ 41 ${sysconfdir}/thermald/thermal-conf.xml \
33 ${sysconfdir}/thermald/thermal-cpu-cdev-order.xml \ 42 ${sysconfdir}/thermald/thermal-cpu-cdev-order.xml \
34 " 43 "
diff --git a/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0001-Add-print-function-to-print-test-run-status-in-ptest.patch b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0001-Add-print-function-to-print-test-run-status-in-ptest.patch
new file mode 100644
index 00000000..4d583657
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0001-Add-print-function-to-print-test-run-status-in-ptest.patch
@@ -0,0 +1,53 @@
1From deccc0c69c2c8759c52885be8bdda54d3cee481c Mon Sep 17 00:00:00 2001
2From: Yogesh Tyagi <yogesh.tyagi@intel.com>
3Date: Sun, 11 Dec 2022 22:34:15 +0800
4Subject: [PATCH] Add print function to print test run status in ptest format
5
6Upstream-Status: Inappropriate [OE ptest specific]
7
8Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com>
9---
10 run_tests.py | 16 ++++++++++++++++
11 1 file changed, 16 insertions(+)
12
13diff --git a/run_tests.py b/run_tests.py
14index 1cd796dd..e3ffd1ab 100755
15--- a/run_tests.py
16+++ b/run_tests.py
17@@ -327,6 +327,9 @@ def run_test(testname, host, target):
18 else:
19 ispc_exe_rel = add_prefix(host.ispc_cmd, host, target)
20
21+ # to reslove the error '.rodata' can not be used when making a PIE object
22+ ispc_exe_rel = ispc_exe_rel + " --pic"
23+
24 # is this a test to make sure an error is issued?
25 want_error = (filename.find("tests_errors") != -1)
26 if want_error == True:
27@@ -795,6 +798,17 @@ def check_compiler_exists(compiler_exe):
28 return
29 error("missing the required compiler: %s \n" % compiler_exe, 1)
30
31+def print_test_run_status(results):
32+ for fstatus in results:
33+ if (fstatus[1] == Status.Success):
34+ print( "%s: %s" % ("PASS", fstatus[0]))
35+ elif (fstatus[1] == Status.Compfail):
36+ print( "%s: %s" % ("FAIL", fstatus[0]))
37+ elif (fstatus[1] == Status.Runfail):
38+ print( "%s: %s" % ("FAIL", fstatus[0]))
39+ elif (fstatus[1] == Status.Skip):
40+ print( "%s: %s" % ("SKIP", fstatus[0]))
41+
42 def print_result(status, results, s, run_tests_log, csv):
43 title = StatusStr[status]
44 file_list = [fname for fname, fstatus in results if status == fstatus]
45@@ -938,6 +952,8 @@ def run_tests(options1, args, print_version):
46 pass_rate = -1
47 print_debug("PASSRATE (%d/%d) = %d%% \n\n" % (len(run_succeed_files), total_tests_executed, pass_rate), s, run_tests_log)
48
49+ print_test_run_status(results)
50+
51 for status in Status:
52 print_result(status, results, s, run_tests_log, options.csv)
53 fails = [status != Status.Compfail and status != Status.Runfail for _, status in results]
diff --git a/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0001-Fix-QA-Issues.patch b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0001-Fix-QA-Issues.patch
new file mode 100644
index 00000000..b0a76ff9
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0001-Fix-QA-Issues.patch
@@ -0,0 +1,36 @@
1From 7beff95c11071170eb27b6fa7d0cc77588caee8e Mon Sep 17 00:00:00 2001
2From: Yogesh Tyagi <yogesh.tyagi@intel.com>
3Date: Tue, 26 Jul 2022 15:25:10 +0800
4Subject: [PATCH] Fix QA Issues
5
6Stop ispc from inserting host file path in generated headers which leads to reproducibility problems.
7
8Upstream-Status: Inappropriate [OE build specific]
9
10Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com>
11---
12 src/module.cpp | 4 ++--
13 1 file changed, 2 insertions(+), 2 deletions(-)
14
15diff --git a/src/module.cpp b/src/module.cpp
16index e2084d2e..e2626865 100644
17--- a/src/module.cpp
18+++ b/src/module.cpp
19@@ -2555,7 +2555,7 @@ bool Module::writeHeader(const char *fn) {
20 perror("fopen");
21 return false;
22 }
23- fprintf(f, "//\n// %s\n// (Header automatically generated by the ispc compiler.)\n", fn);
24+ fprintf(f, "//\n// \n// (Header automatically generated by the ispc compiler.)\n");
25 fprintf(f, "// DO NOT EDIT THIS FILE.\n//\n\n");
26
27 // Create a nice guard string from the filename, turning any
28@@ -2677,7 +2677,7 @@ bool Module::writeDispatchHeader(DispatchHeaderInfo *DHI) {
29 FILE *f = DHI->file;
30
31 if (DHI->EmitFrontMatter) {
32- fprintf(f, "//\n// %s\n// (Header automatically generated by the ispc compiler.)\n", DHI->fn);
33+ fprintf(f, "//\n// \n// (Header automatically generated by the ispc compiler.)\n");
34 fprintf(f, "// DO NOT EDIT THIS FILE.\n//\n\n");
35 }
36 // Create a nice guard string from the filename, turning any
diff --git a/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0002-cmake-don-t-build-for-32-bit-targets.patch b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0002-cmake-don-t-build-for-32-bit-targets.patch
new file mode 100644
index 00000000..f452dc50
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/0002-cmake-don-t-build-for-32-bit-targets.patch
@@ -0,0 +1,52 @@
1From 16a2c22339287122d2c25d8bb33a5a51b4e6ee51 Mon Sep 17 00:00:00 2001
2From: Naveen Saini <naveen.kumar.saini@intel.com>
3Date: Thu, 24 Feb 2022 20:01:11 +0530
4Subject: [PATCH] cmake: don't build for 32-bit targets
5
6Error log:
7| tmp/work/corei7-64-poky-linux/ispc/1.16.0-r0/recipe-sysroot/usr/include/bits/long-double.h:23:10: fatal error: 'bits/long-double-32.h' file not found
8| #include <bits/long-double-32.h>
9| ^~~~~~~~~~~~~~~~~~~~~~~
10| 1 error generated.
11
12Remove SYSTEM include search path and set -isysroot dir path
13for root dir for cross compilation.
14
15Upstream-Status: Inappropriate
16
17Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
18---
19 cmake/GenerateBuiltins.cmake | 6 +++---
20 1 file changed, 3 insertions(+), 3 deletions(-)
21
22diff --git a/cmake/GenerateBuiltins.cmake b/cmake/GenerateBuiltins.cmake
23index f84494ed..d90cb1ec 100644
24--- a/cmake/GenerateBuiltins.cmake
25+++ b/cmake/GenerateBuiltins.cmake
26@@ -253,7 +253,7 @@ function(builtin_to_cpp bit os_name arch supported_archs supported_oses resultFi
27 # In this case headers will be installed in /usr/arm-linux-gnueabihf/include and will not be picked up
28 # by clang by default. So the following line adds such path explicitly. If this path doesn't exist and
29 # the headers can be found in other locations, this should not be a problem.
30- set(includePath -isystem/usr/${debian_triple}/include)
31+ set(includePath -isysroot${SYSROOT_DIR})
32 endif()
33 endif()
34
35@@ -339,7 +339,7 @@ function (generate_target_builtins resultList)
36 set(regular_targets ${ARGN})
37 list(FILTER regular_targets EXCLUDE REGEX wasm)
38 foreach (ispc_target ${regular_targets})
39- foreach (bit 32 64)
40+ foreach (bit 64)
41 foreach (os_name ${TARGET_OS_LIST_FOR_LL})
42 target_ll_to_cpp(target-${ispc_target} ${bit} ${os_name} output${os_name}${bit})
43 list(APPEND tmpList ${output${os_name}${bit}})
44@@ -405,7 +405,7 @@ function (generate_common_builtins resultList)
45 endif()
46
47 message (STATUS "ISPC will be built with support of ${supported_oses} for ${supported_archs}")
48- foreach (bit 32 64)
49+ foreach (bit 64)
50 foreach (os_name "windows" "linux" "freebsd" "macos" "android" "ios" "ps4" "web")
51 foreach (arch "x86" "arm" "wasm")
52 builtin_to_cpp(${bit} ${os_name} ${arch} "${supported_archs}" "${supported_oses}" res${bit}${os_name}${arch})
diff --git a/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/run-ptest b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/run-ptest
new file mode 100644
index 00000000..77d13bb4
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc/run-ptest
@@ -0,0 +1,2 @@
1#!/bin/sh
2python3 run_tests.py
diff --git a/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc_1.23.0.bb b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc_1.23.0.bb
new file mode 100644
index 00000000..ed8df859
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-core/ispc/ispc_1.23.0.bb
@@ -0,0 +1,64 @@
1SUMMARY = "Intel(R) Implicit SPMD Program Compiler"
2DESCRIPTION = "ispc is a compiler for a variant of the C programming language, \
3with extensions for single program, multiple data programming."
4HOMEPAGE = "https://github.com/ispc/ispc"
5
6LICENSE = "BSD-3-Clause & Apache-2.0-with-LLVM-exception"
7LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=da5ecffdd210b3cf776b32b41c182e87 \
8 file://third-party-programs.txt;md5=2061218c7be521556719c8b504bf9ddd"
9
10inherit cmake python3native ptest
11
12S = "${WORKDIR}/git"
13
14SRC_URI = "git://github.com/ispc/ispc.git;protocol=https;branch=main \
15 file://0002-cmake-don-t-build-for-32-bit-targets.patch \
16 file://0001-Fix-QA-Issues.patch \
17 file://0001-Add-print-function-to-print-test-run-status-in-ptest.patch \
18 file://run-ptest \
19 "
20
21SRCREV = "bcb2cf896c00f9a802a11cbf291ef6e44b205416"
22
23COMPATIBLE_HOST = '(x86_64).*-linux'
24
25DEPENDS += " clang-native bison-native flex-native"
26DEPENDS:append:class-target = " clang"
27RDEPENDS:${PN}-ptest += " python3-multiprocessing"
28
29PACKAGECONFIG ??= "tbb"
30PACKAGECONFIG[tbb] = "-DISPCRT_BUILD_TASK_MODEL=TBB, -DISPCRT_BUILD_TASK_MODEL=OpenMP, tbb"
31
32YFLAGS='-d -t -v -y --file-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}'
33
34do_configure:prepend() {
35 sed -i -e 's#\${BISON_EXECUTABLE}.*#\${BISON_EXECUTABLE} ${YFLAGS} #g' ${S}/CMakeLists.txt
36 sed -i -e 's#\${FLEX_EXECUTABLE}.*#\${FLEX_EXECUTABLE} \-L #g' ${S}/CMakeLists.txt
37}
38
39do_install_ptest() {
40 cp -rf ${S}/run_tests.py ${D}${PTEST_PATH}
41 cp -rf ${S}/common.py ${D}${PTEST_PATH}
42 cp -rf ${S}/tests ${D}${PTEST_PATH}
43 cp -rf ${S}/test_static.isph ${D}${PTEST_PATH}
44 cp -rf ${S}/fail_db.txt ${D}${PTEST_PATH}
45 cp -rf ${S}/test_static.cpp ${D}${PTEST_PATH}
46}
47
48EXTRA_OECMAKE += " \
49 -DISPC_INCLUDE_TESTS=OFF \
50 -DISPC_INCLUDE_EXAMPLES=OFF \
51 -DARM_ENABLED=OFF \
52 -DISPC_CROSS=ON \
53 -DISPC_ANDROID_TARGET=OFF \
54 -DISPC_FREEBSD_TARGET=OFF \
55 -DISPC_WINDOWS_TARGET=OFF \
56 -DISPC_IOS_TARGET=OFF \
57 -DISPC_PS_TARGET=OFF \
58 -DSYSROOT_DIR=${STAGING_DIR} \
59 -DCLANG_EXECUTABLE=${STAGING_BINDIR_NATIVE}/clang \
60 -DCLANGPP_EXECUTABLE=${STAGING_BINDIR_NATIVE}/clang++ \
61 -DLLVM_AS_EXECUTABLE=${STAGING_BINDIR_NATIVE}/llvm-as \
62 "
63
64BBCLASSEXTEND = "native nativesdk"
diff --git a/dynamic-layers/openembedded-layer/recipes-core/levelzero/level-zero_1.15.8.bb b/dynamic-layers/openembedded-layer/recipes-core/levelzero/level-zero_1.15.8.bb
new file mode 100644
index 00000000..8bade9f4
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-core/levelzero/level-zero_1.15.8.bb
@@ -0,0 +1,33 @@
1SUMMARY = "oneAPI Level Zero Specification Headers and Loader"
2HOMEPAGE = "https://github.com/oneapi-src/level-zero"
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=97957beb2f7808ffa247e5d93e6442cc"
5
6SRC_URI = "git://github.com/oneapi-src/level-zero.git;protocol=https;branch=master"
7SRCREV = "1685d01497428ca4d8b99200972b64685424d5c9"
8S = "${WORKDIR}/git"
9
10inherit cmake
11DEPENDS += "opencl-headers"
12
13UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>(\d+(\.\d+)+))$"
14
15PACKAGES =+ "${PN}-headers ${PN}-samples ${PN}-loader"
16
17do_install:append () {
18 install -d ${D}${bindir} ${D}${libdir}
19 install -m 755 ${B}/bin/zello* ${D}${bindir}
20
21 oe_libinstall -C lib libze_null ${D}${libdir}
22}
23
24
25FILES:${PN}-headers = "${includedir}"
26FILES:${PN}-samples = "${bindir} ${libdir}/libze_null* ${libdir}/libze_validation*"
27FILES:${PN}-loader = "${libdir}"
28
29# PN-loader (non -dev/-dbg/nativesdk- package) contains symlink .so
30INSANE_SKIP:${PN}-loader = "dev-so"
31INSANE_SKIP:${PN}-samples = "dev-so"
32ALLOW_EMPTY:${PN} = "1"
33BBCLASSEXTEND = "native nativesdk"
diff --git a/dynamic-layers/openembedded-layer/recipes-oneapi/dpcpp-compiler/intel-oneapi-dpcpp-cpp-runtime_2024.0.0-49819.bb b/dynamic-layers/openembedded-layer/recipes-oneapi/dpcpp-compiler/intel-oneapi-dpcpp-cpp-runtime_2024.0.0-49819.bb
new file mode 100644
index 00000000..cedbae1e
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-oneapi/dpcpp-compiler/intel-oneapi-dpcpp-cpp-runtime_2024.0.0-49819.bb
@@ -0,0 +1,54 @@
1SUMMARY = "Intel® oneAPI DPC++/C++ Compiler runtime files"
2DESCRIPTION = "The Intel® oneAPI DPC++/C++ Compiler provides optimizations \
3that help your applications run faster on Intel® 64 architectures with support \
4for the latest C, C++, and SYCL language standards. This compiler produces \
5optimized code that can run significantly faster by taking advantage of the \
6ever-increasing core count and vector register width in Intel® Xeon® processors \
7and compatible processors."
8
9HOMEPAGE = "https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compiler.html"
10
11LICENSE="EULA"
12
13COMPILERMAINVER = "2024.0"
14
15LIC_FILES_CHKSUM = " \
16 file://opt/intel/oneapi/licensing/${COMPILERMAINVER}/licensing/${COMPILERMAINVER}/license.htm;md5=5ff64c6ff3ef98089ed69360e7a84c39 \
17 "
18COMPILERDOTVER = "2024.0.0-49406"
19DEVUTILITVERSION = "2024.0-2024.0.0-49320"
20SRC_URI = " \
21 https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-compiler-dpcpp-cpp-runtime-${COMPILERMAINVER}-${PV}_amd64.deb;subdir=${BPN};name=dpcpp-runtime \
22 https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-compiler-dpcpp-cpp-common-${COMPILERMAINVER}-${PV}_all.deb;subdir=${BPN};name=dpcpp-common \
23 https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-compiler-shared-runtime-${COMPILERMAINVER}-${PV}_amd64.deb;subdir=${BPN};name=compiler-shared-runtime \
24 https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-common-vars-${COMPILERDOTVER}_all.deb;subdir=${BPN};name=common-vars \
25 https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-openmp-${COMPILERMAINVER}-${PV}_amd64.deb;subdir=${BPN};name=openmp \
26 https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-openmp-common-${COMPILERMAINVER}-${PV}_all.deb;subdir=${BPN};name=openmp-common \
27 https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-common-licensing-${COMPILERMAINVER}-${COMPILERDOTVER}_all.deb;subdir=${BPN};name=license \
28 https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-dev-utilities-${DEVUTILITVERSION}_amd64.deb;subdir=${BPN};name=dev-utils \
29 "
30
31SRC_URI[dpcpp-runtime.sha256sum] = "e24f0ba69daf3f66ceaf23d5e632f183cdb90bac69f65407fdb4407fc9034f33"
32SRC_URI[dpcpp-common.sha256sum] = "f5a3db6a725598224edf1099260955aee3e36beadcaed2af5b8b453e873a82fa"
33SRC_URI[compiler-shared-runtime.sha256sum] = "bce010cbe076259ddd3feb8e69792869e22fccd5b4e2c9af9e815826f2c1a394"
34SRC_URI[common-vars.sha256sum] = "368553c99db1b52060b8225355336778be0b00e5991d0f769c42f891c6328750"
35SRC_URI[openmp.sha256sum] = "154ff1e81adfdc872ba1d47bd860de70d62188417c7128422435dfd0ceca62fe"
36SRC_URI[openmp-common.sha256sum] = "8217001d78311cbef97dd139e684c6767932b532309c3843ba57d7894d15c07d"
37SRC_URI[license.sha256sum] = "9f9c8a12fc0bc82ab5b71e118e66745eff23f42224eba304068225b366cd74b6"
38SRC_URI[dev-utils.sha256sum] = "c675d960a5abca361cead9217d6e74adee499ee0a095c4e44092bd710b304d50"
39
40S = "${WORKDIR}/${BPN}"
41
42inherit bin_package
43
44RDEPENDS:${PN} += "virtual-opencl-icd zlib tbb level-zero-loader bash tcsh"
45SKIP_FILEDEPS:${PN} = '1'
46
47INHIBIT_PACKAGE_STRIP = "1"
48INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
49
50# doesn't have GNU_HASH (didn't pass LDFLAGS?)
51INSANE_SKIP:${PN} += "textrel dev-so dev-elf ldflags already-stripped staticdev rpaths arch useless-rpaths file-rdeps"
52
53FILES_SOLIBSDEV = ""
54BBCLASSEXTEND = "native nativesdk"
diff --git a/dynamic-layers/openembedded-layer/recipes-oneapi/dpcpp-compiler/intel-oneapi-dpcpp-cpp_2024.0.0-49819.bb b/dynamic-layers/openembedded-layer/recipes-oneapi/dpcpp-compiler/intel-oneapi-dpcpp-cpp_2024.0.0-49819.bb
new file mode 100644
index 00000000..90ada087
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-oneapi/dpcpp-compiler/intel-oneapi-dpcpp-cpp_2024.0.0-49819.bb
@@ -0,0 +1,45 @@
1SUMMARY = "Intel® oneAPI DPC++/C++ Compiler"
2DESCRIPTION = "The Intel® oneAPI DPC++/C++ Compiler provides optimizations \
3that help your applications run faster on Intel® 64 architectures with support \
4for the latest C, C++, and SYCL language standards. This compiler produces \
5optimized code that can run significantly faster by taking advantage of the \
6ever-increasing core count and vector register width in Intel® Xeon® processors \
7and compatible processors."
8
9HOMEPAGE = "https://www.intel.com/content/www/us/en/developer/tools/oneapi/dpc-compiler.html"
10
11LICENSE="EULA"
12
13COMPILERMAINVER = "2024.0"
14
15LIC_FILES_CHKSUM = " \
16 file://opt/intel/oneapi/compiler/${COMPILERMAINVER}/share/doc/compiler/credist.txt;md5=b41f55af9f479b9570fc35b955d5ba1a \
17 "
18
19SRC_URI = " \
20 https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-dpcpp-cpp-${COMPILERMAINVER}-${PV}_amd64.deb;subdir=${BPN};name=icx-compiler \
21 https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-compiler-shared-${COMPILERMAINVER}-${PV}_amd64.deb;subdir=${BPN};name=compiler-linker \
22 https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-compiler-shared-common-${COMPILERMAINVER}-${PV}_all.deb;subdir=${BPN};name=shared-common \
23 "
24
25SRC_URI[icx-compiler.sha256sum] = "0dcbac766d5a1519d4cf393f5a85e71d19024fef65f77638f3f849796b62cd82"
26SRC_URI[compiler-linker.sha256sum] = "e00faea6d797934d62143e4aa70b727ce30f80fdf30769d22122b3051140c236"
27SRC_URI[shared-common.sha256sum] = "cf490a4a790f349da79e618359598d3b32312ca3b2639e5d4c84e1cfa2745558"
28
29S = "${WORKDIR}/${BPN}"
30
31inherit bin_package
32
33RDEPENDS:${PN} += "intel-oneapi-dpcpp-cpp-runtime"
34SKIP_FILEDEPS:${PN} = '1'
35
36INHIBIT_PACKAGE_STRIP = "1"
37INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
38
39# doesn't have GNU_HASH (didn't pass LDFLAGS?)
40INSANE_SKIP:${PN} += "textrel dev-so dev-elf ldflags already-stripped file-rdeps staticdev rpaths arch useless-rpaths"
41
42FILES_SOLIBSDEV = ""
43
44EXCLUDE_FROM_SHLIBS = "1"
45BBCLASSEXTEND = "native nativesdk"
diff --git a/dynamic-layers/openembedded-layer/recipes-oneapi/embree/embree_4.3.1.bb b/dynamic-layers/openembedded-layer/recipes-oneapi/embree/embree_4.3.1.bb
new file mode 100644
index 00000000..fb341b01
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-oneapi/embree/embree_4.3.1.bb
@@ -0,0 +1,30 @@
1SUMMARY = "Collection of high-performance ray tracing kernels"
2DESCRIPTION = "A collection of high-performance ray tracing kernels \
3intended to graphics application engineers that want to improve the \
4performance of their application."
5HOMEPAGE = "https://github.com/embree/embree"
6
7LICENSE = "Apache-2.0 & syrah"
8LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57 \
9 file://third-party-programs.txt;md5=f989f5b74cfff0d45d3ccf0e1366cbdc \
10 file://common/math/transcendental.h;beginline=6;endline=8;md5=73380bb2ab6613b30b8464f114bd0ca8"
11
12inherit pkgconfig cmake
13
14S = "${WORKDIR}/git"
15
16SRC_URI = "git://github.com/embree/embree.git;protocol=https;branch=master"
17SRCREV = "daa8de0e714e18ad5e5c9841b67c1950d9c91c51"
18
19COMPATIBLE_HOST = '(x86_64).*-linux'
20COMPATIBLE_HOST:libc-musl = "null"
21
22DEPENDS = "tbb jpeg libpng glfw ispc-native"
23
24EXTRA_OECMAKE += " \
25 -DEMBREE_IGNORE_CMAKE_CXX_FLAGS=OFF \
26 -DEMBREE_MAX_ISA=DEFAULT \
27 -DEMBREE_TUTORIALS=OFF \
28 -DEMBREE_ISPC_SUPPORT=ON \
29 -DEMBREE_ZIP_MODE=OFF \
30 "
diff --git a/dynamic-layers/openembedded-layer/recipes-oneapi/ipp/intel-oneapi-ipp_2021.10.0-653.bb b/dynamic-layers/openembedded-layer/recipes-oneapi/ipp/intel-oneapi-ipp_2021.10.0-653.bb
new file mode 100644
index 00000000..1841253e
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-oneapi/ipp/intel-oneapi-ipp_2021.10.0-653.bb
@@ -0,0 +1,35 @@
1DESCRIPTION = "Intel® Integrated Performance Primitives are production-ready \
2 building blocks for cross-platform performance. Develop high-performance vision, \
3 signal, security, and storage applications with this multithreaded software library."
4HOMEPAGE = "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/ipp.html"
5
6LICENSE = "ISSL"
7
8MAXVER = "2021.10"
9
10LIC_FILES_CHKSUM = " \
11 file://opt/intel/oneapi/ipp/${MAXVER}/share/doc/ipp/licensing/license.txt;md5=d7cdc92ed6c4de1263da879599ddc3e2 \
12 file://opt/intel/oneapi/ipp/${MAXVER}/share/doc/ipp/licensing/third-party-programs.txt;md5=22bd13987911dcf790907041b43081f3 \
13 "
14SRC_URI = " \
15 https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-ipp-${MAXVER}-${PV}_amd64.deb;subdir=${BPN};name=ipp \
16 https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-ipp-common-devel-${MAXVER}-${PV}_all.deb;subdir=${BPN};name=headers \
17 https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-ipp-common-${MAXVER}-${PV}_all.deb;subdir=${BPN};name=env \
18 "
19
20SRC_URI[ipp.sha256sum] = "b51e45c6e691aa46c7136b0ab61f5abe346388433e017a30cf53fd23e92bea07"
21SRC_URI[headers.sha256sum] = "342f37ab2f82bc9f4498435f848ee660591c2488b44d988bf6ee96b2a71fd005"
22SRC_URI[env.sha256sum] = "731e8c28a3b8b757730cd874d0941de2eb744856128f24ade59d36c12b415bf6"
23
24S = "${WORKDIR}/${BPN}"
25
26COMPATIBLE_HOST:libc-musl = "null"
27
28inherit bin_package
29
30INHIBIT_PACKAGE_STRIP = "1"
31INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
32INHIBIT_DEFAULT_DEPS = ""
33
34RDEPENDS:${PN} += "tbb setup-intel-oneapi-env"
35INSANE_SKIP:${PN} += "ldflags dev-so"
diff --git a/dynamic-layers/openembedded-layer/recipes-oneapi/mkl/intel-oneapi-mkl_2024.0.0-49656.bb b/dynamic-layers/openembedded-layer/recipes-oneapi/mkl/intel-oneapi-mkl_2024.0.0-49656.bb
new file mode 100644
index 00000000..e3e93028
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-oneapi/mkl/intel-oneapi-mkl_2024.0.0-49656.bb
@@ -0,0 +1,74 @@
1SUMMARY = "Intel® oneAPI Math Kernel Library (oneMKL)"
2DESCRIPTION = "The Intel® oneAPI Math Kernel Library (oneMKL) is a computing \
3 math library of highly optimized and extensively parallelized routines \
4 for applications that require maximum performance. oneMKL contains \
5 the high-performance optimizations from the full Intel® Math Kernel Library \
6 for CPU architectures (with C/Fortran programming language interfaces)\
7 and adds to them a set of DPC++ programming language interfaces for \
8 achieving performance on various CPU architectures \
9 and Intel Graphics Technology for certain key functionalities."
10HOMEPAGE = "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onemkl.html"
11
12LICENSE = "ISSL"
13
14MKLMAINVER = "2024.0"
15
16LIC_FILES_CHKSUM = " \
17 file://opt/intel/oneapi/mkl/${MKLMAINVER}/share/doc/mkl/licensing/license.txt;md5=8510d21bf355a76e378c3216c3929ccd \
18 file://opt/intel/oneapi/mkl/${MKLMAINVER}/share/doc/mkl/licensing/third-party-programs-benchmarks.txt;md5=cb98e1a1f14c05ea85a979ea8982e7a4 \
19 file://opt/intel/oneapi/mkl/${MKLMAINVER}/share/doc/mkl/licensing/third-party-programs-ipp.txt;md5=a4b2bf15e38f5c1267cdafed18bc0b09 \
20 file://opt/intel/oneapi/mkl/${MKLMAINVER}/share/doc/mkl/licensing/third-party-programs-openmp.txt;md5=6b3c1aa2a11393060074c0346ce21e49 \
21 file://opt/intel/oneapi/mkl/${MKLMAINVER}/share/doc/mkl/licensing/third-party-programs-safestring.txt;md5=c3aeee91c6d35a0f0753aed6c2633b82 \
22 file://opt/intel/oneapi/mkl/${MKLMAINVER}/share/doc/mkl/licensing/third-party-programs.txt;md5=27de873e4084d62530fe828406b33ca9 \
23 "
24
25SRC_URI = " \
26 https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-mkl-${MKLMAINVER}-${PV}_amd64.deb;subdir=${BPN};name=runtime \
27 https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-mkl-common-devel-${MKLMAINVER}-${PV}_all.deb;subdir=${BPN};name=common-devel \
28 https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-mkl-devel-${MKLMAINVER}-${PV}_amd64.deb;subdir=${BPN};name=devel \
29 https://apt.repos.intel.com/oneapi/pool/main/intel-oneapi-mkl-common-${MKLMAINVER}-${PV}_all.deb;subdir=${BPN};name=common-vars \
30 "
31
32SRC_URI[runtime.sha256sum] = "10a86e24051d6ef4a80fd839c570e629190638a3c0ac9bcca99ab855f534b959"
33SRC_URI[common-devel.sha256sum] = "adbf0ea946f63946d29b7f9c750c38a42ea7a65d8c81655b268aa2c7bb908192"
34SRC_URI[devel.sha256sum] = "fab2a6f15e18bfd9b4d425f2703e4e98928c57f52c4feebc9ed886f097062e84"
35SRC_URI[common-vars.sha256sum] = "ec2b67813739fa4a2895f63479a41acba2174afe2d0cb8a0c1c9119d1317d8ef"
36
37S = "${WORKDIR}/${BPN}"
38
39inherit bin_package
40
41do_install:append () {
42 install -d ${D}${bindir}
43 (cd ${D}${bindir} ; ln -s ../../opt/intel/oneapi/mkl/${MKLMAINVER}/bin/* .)
44 install -d ${D}${libdir}
45 (cd ${D}${libdir} ; ln -s ../../opt/intel/oneapi/mkl/${MKLMAINVER}/lib/intel64/*.so* .)
46 (cd ${D}${libdir} ; ln -s ../../opt/intel/oneapi/mkl/${MKLMAINVER}/lib/intel64/*.a* .)
47 install -d ${D}${libdir}/pkgconfig
48 (cd ${D}${libdir}/pkgconfig ; ln -s ../../../opt/intel/oneapi/mkl/${MKLMAINVER}/lib/pkgconfig/* .)
49 install -d ${D}${libdir}/cmake
50 (cd ${D}${libdir}/cmake ; ln -s ../../../opt/intel/oneapi/mkl/${MKLMAINVER}/lib/cmake/* .)
51
52 install -d ${D}${includedir}
53 find ${D}/opt/intel/oneapi/mkl/${MKLMAINVER}/include/ -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read srcdir; do
54 install -d ${D}${includedir}/$srcdir
55 (cd ${D}${includedir} ; ln -s ../../opt/intel/oneapi/mkl/${MKLMAINVER}/include/$srcdir/* ./$srcdir/)
56 done
57
58 find ${D}/opt/intel/oneapi/mkl/${MKLMAINVER}/include/ -mindepth 1 -maxdepth 1 -type f -printf '%f\n' | while read srcfile; do
59 (cd ${D}${includedir} ; ln -s ../../opt/intel/oneapi/mkl/${MKLMAINVER}/include/$srcfile .)
60 done
61}
62
63AUTO_LIBNAME_PKGS = ""
64INHIBIT_PACKAGE_STRIP = "1"
65INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
66
67RDEPENDS:${PN} += "bash tbb intel-oneapi-dpcpp-cpp-runtime setup-intel-oneapi-env virtual-opencl-icd"
68INSANE_SKIP:${PN} = "ldflags textrel dev-so staticdev arch already-stripped"
69
70FILES:${PN}-staticdev += "/opt/intel/oneapi/mkl/${MKLMAINVER}/lib/*.a*"
71
72SKIP_FILEDEPS:${PN} = '1'
73
74SYSROOT_DIRS += "/opt"
diff --git a/dynamic-layers/openembedded-layer/recipes-oneapi/oidn/oidn_2.1.0.bb b/dynamic-layers/openembedded-layer/recipes-oneapi/oidn/oidn_2.1.0.bb
new file mode 100644
index 00000000..4ea6ffbe
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-oneapi/oidn/oidn_2.1.0.bb
@@ -0,0 +1,23 @@
1SUMMARY = "Intel® Open Image Denoise"
2DESCRIPTION = "Intel Open Image Denoise is an open source library of \
3high-performance, high-quality denoising filters for images \
4rendered with ray tracing. Intel Open Image Denoise is part \
5of the Intel® oneAPI Rendering Toolkit"
6HOMEPAGE = "https://www.openimagedenoise.org/"
7
8LICENSE = "Apache-2.0 & BSD-3-Clause"
9LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57 \
10 file://external/mkl-dnn/LICENSE;md5=b48e3de3bfd47c27882a0d85b20823f5 \
11 file://external/mkl-dnn/src/cpu/x64/xbyak/COPYRIGHT;md5=3b9bf048d063d54cdb28964db558bcc7 \
12 file://external/mkl-dnn/src/common/ittnotify/LICENSE.BSD;md5=e671ff178b24a95a382ba670503c66fb \
13 file://weights/LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57"
14
15SRC_URI = "https://github.com/OpenImageDenoise/${BPN}/releases/download/v${PV}/${BP}.src.tar.gz\
16 "
17SRC_URI[sha256sum] = "ce144ba582ff36563d9442ee07fa2a4d249bc85aa93e5b25fc527ff4ee755ed6"
18
19inherit cmake
20
21DEPENDS += "tbb ispc-native"
22
23UPSTREAM_CHECK_URI = "https://github.com/OpenImageDenoise/oidn/releases"
diff --git a/dynamic-layers/openembedded-layer/recipes-oneapi/openvkl/openvkl_2.0.1.bb b/dynamic-layers/openembedded-layer/recipes-oneapi/openvkl/openvkl_2.0.1.bb
new file mode 100644
index 00000000..a2d709a1
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-oneapi/openvkl/openvkl_2.0.1.bb
@@ -0,0 +1,42 @@
1SUMMARY = "Intel(R) Open Volume Kernel Library"
2DESCRIPTION = "Intel(R) Open Volume Kernel Library (Intel(R) Open VKL) is a \
3collection of high-performance volume computation kernels. The target users \
4of Open VKL are graphics application engineers who want to improve the \
5performance of their volume rendering applications by leveraging Open VKL’s \
6performance-optimized kernels, which include volume traversal and sampling \
7functionality for a variety of volumetric data formats. The kernels are optimized \
8for the latest Intel(R) processors with support for SSE, AVX, AVX2, and AVX-512 \
9instructions."
10HOMEPAGE = "https://www.openvkl.org/"
11
12LICENSE = "Apache-2.0 & BSD-3-Clause & MIT & Zlib"
13LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57 \
14 file://third-party-programs.txt;md5=69ec7caf49616c471161b921f53d5ec0 \
15 file://testing/external/half.hpp;beginline=1;endline=17;md5=4b60058493630c3bd0ef145470f04a7b"
16
17inherit pkgconfig cmake
18
19S = "${WORKDIR}/git"
20
21SRC_URI = "git://github.com/openvkl/openvkl.git;protocol=https;branch=master \
22 "
23SRCREV = "8c6ba526813b871a624cb9d73d4cbb689ac7f4ce"
24
25COMPATIBLE_HOST = '(x86_64).*-linux'
26COMPATIBLE_HOST:libc-musl = "null"
27
28DEPENDS = "ispc ispc-native rkcommon embree"
29
30EXTRA_OECMAKE += " \
31 -DISPC_EXECUTABLE=${STAGING_BINDIR_NATIVE}/ispc \
32 "
33EXTRA_OECMAKE:intel-corei7-64 += " \
34 -DOPENVKL_ISA_AVX=OFF \
35 -DOPENVKL_ISA_AVX2=OFF \
36 -DOPENVKL_ISA_AVX512SKX=OFF \
37 "
38
39PACKAGES =+ "${PN}-examples"
40FILES:${PN}-examples = "\
41 ${bindir} \
42 "
diff --git a/dynamic-layers/openembedded-layer/recipes-oneapi/ospray/ospray/0001-Fix-GCC11-Compile-Error-in-benchmark_register.h.patch b/dynamic-layers/openembedded-layer/recipes-oneapi/ospray/ospray/0001-Fix-GCC11-Compile-Error-in-benchmark_register.h.patch
new file mode 100644
index 00000000..c2136321
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-oneapi/ospray/ospray/0001-Fix-GCC11-Compile-Error-in-benchmark_register.h.patch
@@ -0,0 +1,28 @@
1From 09e6b6615d9a16e9555eff9d569356e32bd26aa4 Mon Sep 17 00:00:00 2001
2From: benradel <86351445+benradel@users.noreply.github.com>
3Date: Wed, 23 Jun 2021 11:56:03 +0200
4Subject: [PATCH] Fix GCC11 Compile Error in benchmark_register.h
5
6Fix GCC11 compilation error due to missing header "limits" in benchmark_register.h
7
8Upstream-Status: Submitted [https://github.com/ospray/ospray/pull/484/files]
9Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
10---
11 apps/common/external/benchmark/src/benchmark_register.h | 1 +
12 1 file changed, 1 insertion(+)
13
14diff --git a/apps/common/external/benchmark/src/benchmark_register.h b/apps/common/external/benchmark/src/benchmark_register.h
15index 61377d742..8f1bb7795 100644
16--- a/apps/common/external/benchmark/src/benchmark_register.h
17+++ b/apps/common/external/benchmark/src/benchmark_register.h
18@@ -2,6 +2,7 @@
19 #define BENCHMARK_REGISTER_H
20
21 #include <vector>
22+#include <limits>
23
24 #include "check.h"
25
26--
272.32.0
28
diff --git a/dynamic-layers/openembedded-layer/recipes-oneapi/ospray/ospray_3.1.0.bb b/dynamic-layers/openembedded-layer/recipes-oneapi/ospray/ospray_3.1.0.bb
new file mode 100644
index 00000000..3e03dcc2
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-oneapi/ospray/ospray_3.1.0.bb
@@ -0,0 +1,37 @@
1SUMMARY = "Intel OSPray, Ray Tracing based Rendering Engine"
2DESCRIPTION = "Intel OSPRay is an open source, scalable, and portable ray \
3tracing engine for high-performance, high-fidelity visualization on \
4Intel Architecture CPUs."
5HOMEPAGE = "https://www.ospray.org/"
6
7LICENSE = "Apache-2.0 & BSD-3-Clause & MIT & Zlib"
8LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=1dece7821bf3fd70fe1309eaa37d52a2 \
9 file://third-party-programs.txt;md5=e37b77e3bd997abccc359c710fb1f1db \
10 "
11
12inherit pkgconfig cmake
13
14S = "${WORKDIR}/git"
15
16SRC_URI = "git://github.com/ospray/ospray.git;protocol=https;branch=master \
17 "
18SRCREV = "f2a61c2eb58ccd666e34abfdb0fd7049ea073194"
19
20COMPATIBLE_HOST = '(x86_64).*-linux'
21COMPATIBLE_HOST:libc-musl = "null"
22
23DEPENDS = "rkcommon ispc ispc-native openvkl embree"
24
25EXTRA_OECMAKE += " \
26 -DISPC_EXECUTABLE=${STAGING_BINDIR_NATIVE}/ispc \
27 -DOSPRAY_ENABLE_APPS_BENCHMARK=OFF \
28 -DOSPRAY_ENABLE_APPS_TESTING=OFF \
29 -DOSPRAY_ENABLE_APPS_EXAMPLES=OFF \
30 "
31
32PACKAGES =+ "${PN}-apps"
33FILES:${PN}-apps = "\
34 ${bindir} \
35 "
36
37UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>(\d+(\.\d+)+))$"
diff --git a/dynamic-layers/openembedded-layer/recipes-oneapi/rkcommon/rkcommon_1.13.0.bb b/dynamic-layers/openembedded-layer/recipes-oneapi/rkcommon/rkcommon_1.13.0.bb
new file mode 100644
index 00000000..fe6b23ea
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-oneapi/rkcommon/rkcommon_1.13.0.bb
@@ -0,0 +1,19 @@
1SUMMARY = "rkcommon - C++/CMake infrastructure"
2DESCRIPTION = "A common set of C++ infrastructure and CMake utilities \
3used by various components of Intel® oneAPI Rendering Toolkit."
4HOMEPAGE = "https://github.com/ospray/rkcommon"
5
6LICENSE = "Apache-2.0"
7LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57"
8
9inherit pkgconfig cmake
10
11S = "${WORKDIR}/git"
12
13SRC_URI = "git://github.com/ospray/rkcommon.git;protocol=https;branch=master \
14 "
15SRCREV = "7ebfa0765ea590767202b328e7da38102c2f5a15"
16
17DEPENDS = "tbb"
18
19EXTRA_OECMAKE += " -DBUILD_TESTING=OFF"
diff --git a/dynamic-layers/openembedded-layer/recipes-support/ipmctl/ipmctl/0001-CMakeLists-disable-Werror.patch b/dynamic-layers/openembedded-layer/recipes-support/ipmctl/ipmctl/0001-CMakeLists-disable-Werror.patch
new file mode 100644
index 00000000..4474aa3c
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-support/ipmctl/ipmctl/0001-CMakeLists-disable-Werror.patch
@@ -0,0 +1,38 @@
1From ef56be8e6bf2ea273cbeb960f3131164e7b517b6 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Wed, 18 May 2022 12:24:03 +0800
4Subject: [PATCH] CMakeLists: disable Werror
5
6gcc12 highlights minor warnings that cause the build to fail. Ignore
7those until they aren't fixed upstream.
8
9Upstream-Status: Inappropriate
10
11Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
12---
13 CMakeLists.txt | 4 ++--
14 1 file changed, 2 insertions(+), 2 deletions(-)
15
16diff --git a/CMakeLists.txt b/CMakeLists.txt
17index 418483f7..c019fea0 100644
18--- a/CMakeLists.txt
19+++ b/CMakeLists.txt
20@@ -146,7 +146,7 @@ else()
21 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -fno-strict-aliasing -D_FORTIFY_SOURCE=2")
22 if(LNX_BUILD)
23 #A few warnings yet to resolve under esx
24- set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Werror")
25+ #set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Werror")
26 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Werror")
27 endif()
28 set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -ggdb")
29@@ -791,4 +791,4 @@ if(ESX_BUILD)
30 include(CMake/esx.cmake)
31 endif()
32
33-add_subdirectory(src/os/nvm_api_sample)
34\ No newline at end of file
35+add_subdirectory(src/os/nvm_api_sample)
36--
372.35.3
38
diff --git a/dynamic-layers/openembedded-layer/recipes-support/ipmctl/ipmctl/0001-Ignore-STATIC_ASSERTs-and-NULL-define-for-os-and-ut-builds.patch b/dynamic-layers/openembedded-layer/recipes-support/ipmctl/ipmctl/0001-Ignore-STATIC_ASSERTs-and-NULL-define-for-os-and-ut-builds.patch
new file mode 100644
index 00000000..11305e83
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-support/ipmctl/ipmctl/0001-Ignore-STATIC_ASSERTs-and-NULL-define-for-os-and-ut-builds.patch
@@ -0,0 +1,59 @@
1Subject: [PATCH] [PATCH]: ignore static asserts and null define for os and ut
2 builds
3Upstream-Status: Backport
4Signed-off-by: Teoh Suh Haw <suh.haw.teoh@intel.com>
5---
6 MdePkg/Include/Base.h | 12 ++++++++++++
7 1 file changed, 12 insertions(+)
8
9diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h
10index d209e6de28..6e61b8f3d3 100644
11--- a/MdePkg/Include/Base.h
12+++ b/MdePkg/Include/Base.h
13@@ -316,8 +316,12 @@ struct _LIST_ENTRY {
14 #define NULL __null
15 #endif
16 #else
17+#ifndef OS_BUILD
18+#ifndef UNIT_TEST_UEFI_BUILD
19 #define NULL ((VOID *) 0)
20 #endif
21+#endif
22+#endif
23
24 //
25 // Null character
26@@ -779,6 +783,8 @@ typedef UINTN *BASE_LIST;
27 // Section 2.3.1 of the UEFI 2.3 Specification.
28 //
29
30+#ifndef OS_BUILD
31+#ifndef UNIT_TEST_UEFI_BUILD
32 STATIC_ASSERT (sizeof (BOOLEAN) == 1, "sizeof (BOOLEAN) does not meet UEFI Specification Data Type requirements");
33 STATIC_ASSERT (sizeof (INT8) == 1, "sizeof (INT8) does not meet UEFI Specification Data Type requirements");
34 STATIC_ASSERT (sizeof (UINT8) == 1, "sizeof (UINT8) does not meet UEFI Specification Data Type requirements");
35@@ -792,6 +798,8 @@ STATIC_ASSERT (sizeof (CHAR8) == 1, "sizeof (CHAR8) does not meet UEFI Specifi
36 STATIC_ASSERT (sizeof (CHAR16) == 2, "sizeof (CHAR16) does not meet UEFI Specification Data Type requirements");
37 STATIC_ASSERT (sizeof (L'A') == 2, "sizeof (L'A') does not meet UEFI Specification Data Type requirements");
38 STATIC_ASSERT (sizeof (L"A") == 4, "sizeof (L\"A\") does not meet UEFI Specification Data Type requirements");
39+#endif
40+#endif
41
42 //
43 // The following three enum types are used to verify that the compiler
44@@ -812,9 +820,13 @@ typedef enum {
45 __VerifyUint32EnumValue = 0xffffffff
46 } __VERIFY_UINT32_ENUM_SIZE;
47
48+#ifndef OS_BUILD
49+#ifndef UNIT_TEST_UEFI_BUILD
50 STATIC_ASSERT (sizeof (__VERIFY_UINT8_ENUM_SIZE) == 4, "Size of enum does not meet UEFI Specification Data Type requirements");
51 STATIC_ASSERT (sizeof (__VERIFY_UINT16_ENUM_SIZE) == 4, "Size of enum does not meet UEFI Specification Data Type requirements");
52 STATIC_ASSERT (sizeof (__VERIFY_UINT32_ENUM_SIZE) == 4, "Size of enum does not meet UEFI Specification Data Type requirements");
53+#endif
54+#endif
55
56 /**
57 Macro that returns a pointer to the data structure that contains a specified field of
58--
592.37.3
diff --git a/dynamic-layers/openembedded-layer/recipes-support/ipmctl/ipmctl_03.00.00.0485.bb b/dynamic-layers/openembedded-layer/recipes-support/ipmctl/ipmctl_03.00.00.0485.bb
new file mode 100644
index 00000000..c4743d1c
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-support/ipmctl/ipmctl_03.00.00.0485.bb
@@ -0,0 +1,47 @@
1SUMMARY = "Utility for managing Intel Optane DC persistent memory modules"
2DESCRIPTION = "Utility for configuring and managing Intel Optane Persistent \
3Memory modules (PMem). It supports functionality to: \
4Discover DCPMMs on the platform. \
5Provision the platform memory configuration. \
6View and update the firmware on DCPMMs. \
7Configure data-at-rest security on DCPMMs. \
8Track health and performance of DCPMMs. \
9Debug and troubleshoot DCPMMs."
10
11HOMEPAGE = "https://github.com/intel/ipmctl"
12BUGTRACKER = "https://github.com/intel/ipmctl/issues"
13
14LICENSE = "BSD-3-Clause | BSD-2-Clause"
15LIC_FILES_CHKSUM = "file://LICENSE;md5=72b9da60da6219d612ce30b746a0fe71 \
16 file://edk2/License.txt;md5=6123e5bf044a66db96c4ce88a36b2d08"
17
18SRC_URI = "git://github.com/intel/ipmctl.git;protocol=https;branch=master;name=ipmctl; \
19 git://github.com/tianocore/edk2.git;protocol=https;name=edk2;destsuffix=git/edk2;branch=master \
20 file://0001-Ignore-STATIC_ASSERTs-and-NULL-define-for-os-and-ut-builds.patch;patchdir=edk2 \
21 file://0001-CMakeLists-disable-Werror.patch \
22"
23
24SRCREV_ipmctl = "c75bd840ea7820c8f93a5488fcff75d08beedd51"
25#tag edk2-stable202302
26SRCREV_edk2 = "f80f052277c88a67c55e107b550f504eeea947d3"
27SRCREV_FORMAT = "ipmctl_edk2"
28
29S = "${WORKDIR}/git"
30
31inherit cmake dos2unix
32
33DEPENDS = "ndctl pkgconfig-native"
34
35EXTRA_OECMAKE = "-DRELEASE=ON"
36
37do_configure:prepend() {
38 for dir in BaseTools MdeModulePkg MdePkg ShellPkg ; do
39 ln -sf edk2/${dir} ${S}
40 done
41}
42
43do_install:append() {
44 # Remove /var/log/ipmctl as anything created in /var/log will not be
45 # available when tmpfs is mounted at /var/volatile/log.
46 rm -rf ${D}${localstatedir}/log
47}
diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-CPU-Solving-the-build-failure-caused-by-setting-the-.patch b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-CPU-Solving-the-build-failure-caused-by-setting-the-.patch
new file mode 100644
index 00000000..d1851406
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-CPU-Solving-the-build-failure-caused-by-setting-the-.patch
@@ -0,0 +1,43 @@
1From b8c3bae71e6d3417ade5cb537cb1785fd75a75c8 Mon Sep 17 00:00:00 2001
2From: Razvan Apetroaie <117895604+razvanapetroaie@users.noreply.github.com>
3Date: Tue, 20 Feb 2024 02:28:14 +0200
4Subject: [PATCH] [CPU] Solving the build failure caused by setting the
5 "ENABLE_OV_ONNX_FRONTEND" option to "OFF" (#22934)
6
7### Details:
8See the [ticket
9description](https://jira.devtools.intel.com/browse/CVS-132119). The
10solution was checked only on a local setup on Ubuntu, if there's a way
11to check that using the CI please let me know (or if you could run the
12job and paste the link in the comments I would be grateful).
13
14Disclaimer: I'm not a CPU plugin developer, so I can't tell for sure if
15this is the ideal fix and no side effects are introduced. Please take
16that into account when reviewing/merging.
17
18### Tickets:
19 - [CVS-132119](https://jira.devtools.intel.com/browse/CVS-132119)
20
21Upstream-Status: Backport [https://github.com/openvinotoolkit/openvino/commit/b8c3bae71e6d3417ade5cb537cb1785fd75a75c8]
22
23Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com>
24---
25 src/plugins/intel_cpu/tests/functional/CMakeLists.txt | 2 +-
26 1 file changed, 1 insertion(+), 1 deletion(-)
27
28diff --git a/src/plugins/intel_cpu/tests/functional/CMakeLists.txt b/src/plugins/intel_cpu/tests/functional/CMakeLists.txt
29index db5ae8d01c..6941cb528d 100644
30--- a/src/plugins/intel_cpu/tests/functional/CMakeLists.txt
31+++ b/src/plugins/intel_cpu/tests/functional/CMakeLists.txt
32@@ -16,7 +16,7 @@ set(LINK_LIBRARIES funcSharedTests cpuSpecificRtInfo openvino::snippets ov_snipp
33 if(ENABLE_OV_ONNX_FRONTEND)
34 list(APPEND DEFINES TEST_MODELS="${TEST_MODEL_ZOO}")
35 else()
36- set(EXCLUDED_SOURCE_PATHS ${CMAKE_CURRENT_SOURCE_DIR}/extension ${CMAKE_CURRENT_SOURCE_DIR}/shared_tests_instances/onnx)
37+ set(EXCLUDED_SOURCE_PATHS ${CMAKE_CURRENT_SOURCE_DIR}/custom/extension ${CMAKE_CURRENT_SOURCE_DIR}/shared_tests_instances/onnx)
38 endif()
39
40 if(NOT (ARM OR AARCH64))
41--
422.34.1
43
diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-cmake-fix-build-when-using-sysroot.patch b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-cmake-fix-build-when-using-sysroot.patch
new file mode 100644
index 00000000..d251f21b
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-cmake-fix-build-when-using-sysroot.patch
@@ -0,0 +1,32 @@
1From b5dfcf8bc1245e804c847745c237068eb6f19931 Mon Sep 17 00:00:00 2001
2From: Yogesh Tyagi <yogesh.tyagi@intel.com>
3Date: Fri, 15 Mar 2024 16:28:41 +0800
4Subject: [PATCH] cmake: fix build when using sysroot
5
6When cross-compiling against a sysroot, system headers will not be at a place
7that starts with /usr. Update conditional check to exclude directories
8which have "/usr/include" in them to not add <sysroot>/usr/include as well.
9
10Upstream-Status: Submitted [https://github.com/openvinotoolkit/openvino/pull/23486]
11
12Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com>
13---
14 src/cmake/ov_parallel.cmake | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/src/cmake/ov_parallel.cmake b/src/cmake/ov_parallel.cmake
18index 3793db98e30..819d3410531 100644
19--- a/src/cmake/ov_parallel.cmake
20+++ b/src/cmake/ov_parallel.cmake
21@@ -296,7 +296,7 @@ function(ov_set_threading_interface_for TARGET_NAME)
22 if(include_directories)
23 foreach(include_directory IN LISTS include_directories)
24 # cannot include /usr/include headers as SYSTEM
25- if(NOT "${include_directory}" MATCHES "^/usr.*$")
26+ if(NOT "${include_directory}" MATCHES ".*/usr/include.*$")
27 target_include_directories(${TARGET_NAME} SYSTEM
28 ${LINK_TYPE} $<BUILD_INTERFACE:${include_directory}>)
29 else()
30--
312.34.1
32
diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-cmake-yocto-specific-tweaks-to-the-build-process.patch b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-cmake-yocto-specific-tweaks-to-the-build-process.patch
new file mode 100644
index 00000000..7ab31309
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-cmake-yocto-specific-tweaks-to-the-build-process.patch
@@ -0,0 +1,90 @@
1From bfcf5ae581ca4e7266cf7dc65b1c71754cd78cc0 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Wed, 29 Nov 2023 12:42:57 +0530
4Subject: [PATCH 1/4] cmake: yocto specific tweaks to the build process
5
6* Dont try to detect glibc version as that doesn't work when cross compiling.
7* Install sample binaries as well.
8* Dont strip binaries.
9* Dont try to write triggers for CPack. We package ourselves.
10* Fix the installation path for Python modules when baselib = lib64.
11
12Upstream-Status: Inappropriate
13
14Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
15---
16 cmake/developer_package/packaging/rpm/rpm.cmake | 2 +-
17 cmake/developer_package/target_flags.cmake | 2 +-
18 samples/cpp/CMakeLists.txt | 6 +++---
19 src/bindings/python/CMakeLists.txt | 2 +-
20 src/bindings/python/wheel/setup.py | 1 -
21 5 files changed, 6 insertions(+), 7 deletions(-)
22
23diff --git a/cmake/developer_package/packaging/rpm/rpm.cmake b/cmake/developer_package/packaging/rpm/rpm.cmake
24index a7c0ec2cf61..40448e8a962 100644
25--- a/cmake/developer_package/packaging/rpm/rpm.cmake
26+++ b/cmake/developer_package/packaging/rpm/rpm.cmake
27@@ -154,7 +154,7 @@ ov_rpm_specific_settings()
28 # needed to add triggers for packages with libraries
29 set(def_triggers "${OpenVINO_BINARY_DIR}/_CPack_Packages/triggers")
30 set(triggers_content "# /bin/sh -p\n/sbin/ldconfig\n")
31-file(WRITE "${def_triggers}" "${triggers_content}")
32+#file(WRITE "${def_triggers}" "${triggers_content}")
33
34 #
35 # Functions helpful for packaging your modules with RPM cpack
36diff --git a/cmake/developer_package/target_flags.cmake b/cmake/developer_package/target_flags.cmake
37index 29f23e713e1..942dd445b19 100644
38--- a/cmake/developer_package/target_flags.cmake
39+++ b/cmake/developer_package/target_flags.cmake
40@@ -145,4 +145,4 @@ function(ov_glibc_version)
41 endif()
42 endfunction()
43
44-ov_glibc_version()
45+#ov_glibc_version()
46diff --git a/samples/cpp/CMakeLists.txt b/samples/cpp/CMakeLists.txt
47index c814cc37e2c..431e7bd2ed3 100644
48--- a/samples/cpp/CMakeLists.txt
49+++ b/samples/cpp/CMakeLists.txt
50@@ -206,9 +206,9 @@ macro(ov_add_sample)
51 target_link_libraries(${SAMPLE_NAME} PRIVATE ${ov_link_libraries} Threads::Threads ${SAMPLE_DEPENDENCIES})
52
53 install(TARGETS ${SAMPLE_NAME}
54- RUNTIME DESTINATION samples_bin/
55- COMPONENT samples_bin
56- EXCLUDE_FROM_ALL)
57+ DESTINATION ${CMAKE_INSTALL_BINDIR}
58+ COMPONENT samples_bin)
59+
60
61 # create global target with all samples / demo apps
62 if(NOT TARGET ov_samples)
63diff --git a/src/bindings/python/CMakeLists.txt b/src/bindings/python/CMakeLists.txt
64index 58ff9b74302..4763994ba56 100644
65--- a/src/bindings/python/CMakeLists.txt
66+++ b/src/bindings/python/CMakeLists.txt
67@@ -356,7 +356,7 @@ if(ENABLE_PYTHON_PACKAGING)
68 endif()
69
70 set(python_package_prefix "${CMAKE_CURRENT_BINARY_DIR}/install_${pyversion}")
71- set(install_lib "${python_package_prefix}/lib/${python_versioned_folder}/${ov_site_packages}")
72+ set(install_lib "${python_package_prefix}/${CMAKE_INSTALL_LIBDIR}/${python_versioned_folder}/${ov_site_packages}")
73 set(meta_info_subdir "openvino-${OpenVINO_VERSION}-py${python_xy}.egg-info")
74 set(meta_info_file "${install_lib}/${meta_info_subdir}/PKG-INFO")
75
76diff --git a/src/bindings/python/wheel/setup.py b/src/bindings/python/wheel/setup.py
77index 4b056912212..5f05d891310 100644
78--- a/src/bindings/python/wheel/setup.py
79+++ b/src/bindings/python/wheel/setup.py
80@@ -270,7 +270,6 @@ class CustomBuild(build):
81 self.spawn(["cmake", "--install", binary_dir,
82 "--prefix", prefix,
83 "--config", CONFIG,
84- "--strip",
85 "--component", cpack_comp_name])
86
87 def run(self):
88--
892.34.1
90
diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0003-cmake-Fix-overloaded-virtual-error.patch b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0003-cmake-Fix-overloaded-virtual-error.patch
new file mode 100644
index 00000000..e0967d55
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0003-cmake-Fix-overloaded-virtual-error.patch
@@ -0,0 +1,33 @@
1From 900eeeb2953095e651270c0f42ccd8b26fd7885c Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Wed, 29 Nov 2023 12:49:35 +0530
4Subject: [PATCH 3/4] cmake: Fix overloaded-virtual error
5
6* Remove -Werror for:
7|git/src/plugins/intel_gpu/src/kernel_selector/jitter.h:129:28: error: 'virtual kernel_selector::JitDefinitions kernel_selector::JitConstant::GetDefinitions() const' was hidden [-Werror=overloaded-virtual=]
8| 129 | virtual JitDefinitions GetDefinitions() const = 0;
9| |
10
11Upstream-Status: Pending
12
13Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
14---
15 src/plugins/intel_gpu/CMakeLists.txt | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/src/plugins/intel_gpu/CMakeLists.txt b/src/plugins/intel_gpu/CMakeLists.txt
19index b0c66a435d6..a3037147cc2 100644
20--- a/src/plugins/intel_gpu/CMakeLists.txt
21+++ b/src/plugins/intel_gpu/CMakeLists.txt
22@@ -38,7 +38,7 @@ add_subdirectory(thirdparty)
23 include(thirdparty/cmake/rapidjson.cmake)
24
25 if(CMAKE_COMPILER_IS_GNUCXX)
26- ov_add_compiler_flags(-Werror)
27+ #ov_add_compiler_flags(-Werror)
28 endif()
29
30 add_subdirectory(src/runtime)
31--
322.34.1
33
diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0004-protobuf-allow-target-protoc-to-be-built.patch b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0004-protobuf-allow-target-protoc-to-be-built.patch
new file mode 100644
index 00000000..59095133
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0004-protobuf-allow-target-protoc-to-be-built.patch
@@ -0,0 +1,45 @@
1From 3e288ed876c6bcb6aa3174e52446b479255ddf22 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Wed, 29 Nov 2023 12:55:19 +0530
4Subject: [PATCH 4/4] protobuf: allow target protoc to be built
5
6We can run target binaries using a qemu wrapper so allow these to be
7built and run.
8
9Upstream-Status: Inappropriate
10
11Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
12---
13 cmake/developer_package/frontends/frontends.cmake | 2 +-
14 thirdparty/protobuf/CMakeLists.txt | 2 +-
15 2 files changed, 2 insertions(+), 2 deletions(-)
16
17diff --git a/cmake/developer_package/frontends/frontends.cmake b/cmake/developer_package/frontends/frontends.cmake
18index 49c5b881030..2a1ea8562bc 100644
19--- a/cmake/developer_package/frontends/frontends.cmake
20+++ b/cmake/developer_package/frontends/frontends.cmake
21@@ -143,7 +143,7 @@ macro(ov_add_frontend)
22 set(OUTPUT_PB_HEADER ${CMAKE_CURRENT_BINARY_DIR}/${relative_path}/${FILE_WE}.pb.h)
23 add_custom_command(
24 OUTPUT "${OUTPUT_PB_SRC}" "${OUTPUT_PB_HEADER}"
25- COMMAND ${PROTOC_EXECUTABLE} ARGS --cpp_out ${CMAKE_CURRENT_BINARY_DIR} -I ${protofiles_root_dir} ${proto_file}
26+ COMMAND protoc ARGS --cpp_out ${CMAKE_CURRENT_BINARY_DIR} -I ${protofiles_root_dir} ${proto_file}
27 DEPENDS ${PROTOC_DEPENDENCY} ${proto_file}
28 COMMENT "Running C++ protocol buffer compiler (${PROTOC_EXECUTABLE}) on ${proto_file_relative}"
29 VERBATIM
30diff --git a/thirdparty/protobuf/CMakeLists.txt b/thirdparty/protobuf/CMakeLists.txt
31index 4b6d6da87f3..409e492a5b3 100644
32--- a/thirdparty/protobuf/CMakeLists.txt
33+++ b/thirdparty/protobuf/CMakeLists.txt
34@@ -28,7 +28,7 @@ set(ABSL_PROPAGATE_CXX_STD ON CACHE BOOL "Abseil protogate CXX standard to depen
35 if(CMAKE_CROSSCOMPILING OR
36 (APPLE AND (HOST_X86_64 AND AARCH64)) OR
37 (MSVC AND (HOST_X86_64 AND (AARCH64 OR ARM))))
38- set(protobuf_BUILD_PROTOC_BINARIES OFF CACHE BOOL "Build protoc binaries" FORCE)
39+ set(protobuf_BUILD_PROTOC_BINARIES ON CACHE BOOL "Build protoc binaries" FORCE)
40 else()
41 set(protobuf_BUILD_PROTOC_BINARIES ON CACHE BOOL "Build protoc binaries" FORCE)
42 endif()
43--
442.34.1
45
diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/open-model-zoo/0001-use-oe-gflags.patch b/dynamic-layers/openembedded-layer/recipes-support/opencv/open-model-zoo/0001-use-oe-gflags.patch
new file mode 100644
index 00000000..816a98a3
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/open-model-zoo/0001-use-oe-gflags.patch
@@ -0,0 +1,27 @@
1From 804b08023b3f8e72b8e3eb09e464d6775c11d966 Mon Sep 17 00:00:00 2001
2From: Naveen Saini <naveen.kumar.saini@intel.com>
3Date: Fri, 21 Oct 2022 11:38:23 +0800
4Subject: [PATCH] demos: use gflags from meta-oe
5
6Upstream-Status: Inappropriate
7
8Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
9Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
10
11---
12 demos/CMakeLists.txt | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/demos/CMakeLists.txt b/demos/CMakeLists.txt
16index 51767051c..fb7e3d22f 100644
17--- a/demos/CMakeLists.txt
18+++ b/demos/CMakeLists.txt
19@@ -141,7 +141,7 @@ endmacro()
20 find_package(OpenCV REQUIRED COMPONENTS core highgui videoio imgproc imgcodecs)
21 find_package(OpenVINO REQUIRED COMPONENTS Runtime)
22
23-add_subdirectory(thirdparty/gflags)
24+#add_subdirectory(thirdparty/gflags)
25 add_subdirectory(common/cpp)
26
27 find_package(OpenCV QUIET COMPONENTS gapi)
diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/open-model-zoo_2024.0.0.bb b/dynamic-layers/openembedded-layer/recipes-support/opencv/open-model-zoo_2024.0.0.bb
new file mode 100644
index 00000000..495a4786
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/open-model-zoo_2024.0.0.bb
@@ -0,0 +1,54 @@
1SUMMARY = "OpenVINO(TM) Toolkit - Open Model Zoo repository"
2HOMEPAGE = "https://github.com/opencv/open_model_zoo"
3DESCRIPTION = "This repository includes optimized deep learning \
4models and a set of demos to expedite development of high-performance \
5deep learning inference applications."
6
7SRC_URI = "git://github.com/opencv/open_model_zoo.git;protocol=https;branch=master \
8 file://0001-use-oe-gflags.patch \
9 "
10
11SRCREV = "37f60eb7fe1dcdedc552b2fb184d646723ed5e80"
12
13LICENSE = "Apache-2.0"
14LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327 \
15"
16
17inherit cmake
18
19S = "${WORKDIR}/git"
20OECMAKE_SOURCEPATH = "${S}/demos"
21
22DEPENDS += "openvino-inference-engine opencv gflags"
23
24RDEPENDS:${PN} += " \
25 python3-decorator \
26 python3-defusedxml \
27 python3-networkx \
28 python3-protobuf \
29 python3-requests \
30 python3-pyyaml \
31 python3-numpy \
32 bash \
33"
34
35COMPATIBLE_HOST = '(x86_64).*-linux'
36COMPATIBLE_HOST:libc-musl = "null"
37
38EXTRA_OECMAKE += " \
39 -DENABLE_SAMPLES=ON \
40 "
41
42do_install(){
43 install -d ${D}${libdir}
44 install -d ${D}${bindir}
45 install -d ${D}${datadir}/openvino/open-model-zoo/tools
46 install -d ${D}${datadir}/openvino/open-model-zoo/demos
47 cp -rf ${WORKDIR}/build/intel64/Release/*.a ${D}${libdir}
48 cp -rf ${WORKDIR}/build/intel64/Release/*_demo* ${D}${bindir}
49 cp -rf ${WORKDIR}/git/models ${D}${datadir}/openvino/open-model-zoo
50 cp -rf ${WORKDIR}/git/demos ${D}${datadir}/openvino/open-model-zoo
51 cp -rf ${WORKDIR}/git/tools/model_tools ${D}${datadir}/openvino/open-model-zoo/tools
52}
53
54FILES:${PN} += "${datadir}/openvino"
diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2024.0.0.bb b/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2024.0.0.bb
new file mode 100644
index 00000000..94edd1b8
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2024.0.0.bb
@@ -0,0 +1,143 @@
1SUMMARY = "OpenVINO(TM) Toolkit - Deep Learning Deployment Toolkit"
2HOMEPAGE = "https://github.com/opencv/dldt"
3DESCRIPTION = "This toolkit allows developers to deploy pre-trained \
4deep learning models through a high-level C++ Inference Engine API \
5integrated with application logic."
6
7SRC_URI = "git://github.com/openvinotoolkit/openvino.git;protocol=https;name=openvino;branch=releases/2024/0;lfs=0 \
8 git://github.com/openvinotoolkit/oneDNN.git;protocol=https;destsuffix=git/src/plugins/intel_cpu/thirdparty/onednn;name=mkl;nobranch=1 \
9 git://github.com/oneapi-src/oneDNN.git;protocol=https;destsuffix=git/src/plugins/intel_gpu/thirdparty/onednn_gpu;name=onednn;nobranch=1 \
10 git://github.com/herumi/xbyak.git;protocol=https;destsuffix=git/thirdparty/xbyak;name=xbyak;branch=master \
11 git://github.com/nlohmann/json.git;protocol=https;destsuffix=git/thirdparty/json/nlohmann_json;name=json;branch=develop \
12 git://github.com/opencv/ade.git;protocol=https;destsuffix=git/thirdparty/ade;name=ade;nobranch=1 \
13 git://github.com/protocolbuffers/protobuf.git;protocol=https;destsuffix=git/thirdparty/protobuf/protobuf;name=protobuf;branch=3.20.x \
14 git://github.com/gflags/gflags.git;protocol=https;destsuffix=git/thirdparty/gflags/gflags;name=gflags;nobranch=1 \
15 git://github.com/madler/zlib.git;protocol=https;destsuffix=git/thirdparty/zlib/zlib;name=zlib;nobranch=1 \
16 git://github.com/openvinotoolkit/mlas.git;protocol=https;destsuffix=git/src/plugins/intel_cpu/thirdparty/mlas;name=mlas;nobranch=1 \
17 git://github.com/nodejs/node-api-headers.git;protocol=https;destsuffix=git/node-api-headers-src;name=node-api-headers;nobranch=1 \
18 git://github.com/nodejs/node-addon-api.git;protocol=https;destsuffix=git/node-addon-api-src;name=node-addon-api;nobranch=1 \
19 file://0001-cmake-yocto-specific-tweaks-to-the-build-process.patch \
20 file://0003-cmake-Fix-overloaded-virtual-error.patch \
21 file://0004-protobuf-allow-target-protoc-to-be-built.patch \
22 file://0001-cmake-fix-build-when-using-sysroot.patch \
23 file://0001-CPU-Solving-the-build-failure-caused-by-setting-the-.patch \
24 "
25
26SRCREV_openvino = "34caeefd07800b59065345d651949efbe8ab6649"
27SRCREV_mkl = "f82148befdbdc9576ec721c9d500155ee4de8060"
28SRCREV_onednn = "494af5f9921bdae98f1a0e2955fa7d76ff386c4f"
29SRCREV_xbyak = "740dff2e866f3ae1a70dd42d6e8836847ed95cc2"
30SRCREV_json = "9cca280a4d0ccf0c08f47a99aa71d1b0e52f8d03"
31SRCREV_ade = "0e8a2ccdd34f29dba55894f5f3c5179809888b9e"
32SRCREV_protobuf = "fe271ab76f2ad2b2b28c10443865d2af21e27e0e"
33SRCREV_gflags = "e171aa2d15ed9eb17054558e0b3a6a413bb01067"
34SRCREV_zlib = "09155eaa2f9270dc4ed1fa13e2b4b2613e6e4851"
35SRCREV_mlas = "d1bc25ec4660cddd87804fcf03b2411b5dfb2e94"
36SRCREV_node-api-headers = "186e04b5e40e54d7fd1655bc67081cc483f12488"
37SRCREV_node-addon-api = "39a25bf27788ff7a7ea5c64978c4dcd1e7b9d80d"
38SRCREV_FORMAT = "openvino_mkl_onednn_xbyak_json_ade_protobuf_gflags_zlib_node-api-headers_node-addon-api_mlas"
39
40LICENSE = "Apache-2.0 & MIT & BSD-3-Clause & Zlib"
41LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327 \
42 file://thirdparty/xbyak/COPYRIGHT;md5=3c98edfaa50a86eeaef4c6109e803f16 \
43 file://thirdparty/cnpy/LICENSE;md5=689f10b06d1ca2d4b1057e67b16cd580 \
44 file://thirdparty/json/nlohmann_json/LICENSE.MIT;md5=f969127d7b7ed0a8a63c2bbeae002588 \
45 file://thirdparty/ade/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \
46 file://thirdparty/gflags/gflags/COPYING.txt;md5=c80d1a3b623f72bb85a4c75b556551df \
47 file://thirdparty/zlib/zlib/LICENSE;md5=b51a40671bc46e961c0498897742c0b8 \
48 file://src/plugins/intel_cpu/thirdparty/mlas/LICENSE;md5=86d3f3a95c324c9479bd8986968f4327 \
49 file://src/plugins/intel_cpu/thirdparty/onednn/LICENSE;md5=3b64000f6e7d52516017622a37a94ce9 \
50 file://src/plugins/intel_gpu/thirdparty/onednn_gpu/LICENSE;md5=3b64000f6e7d52516017622a37a94ce9 \
51 file://node-api-headers-src/LICENSE;md5=6adb2909701d4605b4b2ae1a9b25d8bd \
52 file://node-addon-api-src/LICENSE.md;md5=0492ef29a9d558a3e9660e7accc9ca6a \
53"
54
55inherit cmake python3native pkgconfig qemu
56
57S = "${WORKDIR}/git"
58EXTRA_OECMAKE += " \
59 -DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper \
60 -DENABLE_OPENCV=OFF \
61 -DENABLE_INTEL_GNA=OFF \
62 -DENABLE_SYSTEM_TBB=ON \
63 -DPYTHON_EXECUTABLE=${PYTHON} \
64 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
65 -DTHREADING=TBB -DTBB_DIR="${STAGING_LIBDIR}/cmake/TBB" \
66 -DTREAT_WARNING_AS_ERROR=FALSE \
67 -DENABLE_DATA=FALSE \
68 -DENABLE_SYSTEM_PUGIXML=TRUE \
69 -DENABLE_OV_ONNX_FRONTEND=FALSE \
70 -DUSE_BUILD_TYPE_SUBFOLDER=OFF \
71 -DENABLE_FUZZING=OFF \
72 -DENABLE_TBBBIND_2_5=OFF \
73 -DCPACK_GENERATOR=RPM \
74 -DENABLE_SYSTEM_FLATBUFFERS=ON \
75 -DENABLE_SYSTEM_SNAPPY=ON \
76 -DFETCHCONTENT_BASE_DIR="${S}" \
77 "
78
79DEPENDS += "\
80 flatbuffers-native \
81 pugixml \
82 python3-pybind11 \
83 python3-pybind11-native \
84 qemu-native \
85 snappy \
86 tbb \
87 "
88
89COMPATIBLE_HOST = '(x86_64).*-linux'
90COMPATIBLE_HOST:libc-musl = "null"
91
92PACKAGECONFIG ?= "opencl samples"
93PACKAGECONFIG[opencl] = "-DENABLE_INTEL_GPU=TRUE, -DENABLE_INTEL_GPU=FALSE, virtual/opencl-icd opencl-headers opencl-clhpp,"
94PACKAGECONFIG[python3] = "-DENABLE_PYTHON=ON -DPYTHON_LIBRARY=${PYTHON_LIBRARY} -DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIR} -DENABLE_PYTHON_PACKAGING=ON, -DENABLE_PYTHON=OFF, patchelf-native, python3 python3-numpy python3-progress"
95PACKAGECONFIG[samples] = "-DENABLE_SAMPLES=ON -DENABLE_COMPILE_TOOL=ON, -DENABLE_SAMPLES=OFF -DENABLE_COMPILE_TOOL=OFF, opencv"
96PACKAGECONFIG[verbose] = "-DVERBOSE_BUILD=1,-DVERBOSE_BUILD=0"
97
98do_configure:prepend() {
99 # Dont set PROJECT_ROOT_DIR
100 sed -i -e 's:\${OpenVINO_SOURCE_DIR}::;' ${S}/src/CMakeLists.txt
101
102 # qemu wrapper that can be used by cmake to run target binaries.
103 qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}"
104 cat > ${WORKDIR}/qemuwrapper << EOF
105#!/bin/sh
106$qemu_binary "\$@"
107EOF
108 chmod +x ${WORKDIR}/qemuwrapper
109}
110
111do_install:append() {
112 rm -rf ${D}${prefix}/install_dependencies
113 rm -rf ${D}${prefix}/setupvars.sh
114
115 find ${B}/src/plugins/intel_cpu/cross-compiled/ -type f -name *_disp.cpp -exec sed -i -e 's%'"${S}"'%'"${TARGET_DBGSRC_DIR}"'%g' {} +
116}
117
118# Otherwise e.g. ros-openvino-toolkit-dynamic-vino-sample when using dldt-inference-engine uses dldt-inference-engine WORKDIR
119# instead of RSS
120SSTATE_SCAN_FILES:append = " *.cmake"
121
122FILES:${PN} += "\
123 ${libdir}/openvino-${PV}/lib*${SOLIBSDEV} \
124 ${libdir}/openvino-${PV}/plugins.xml \
125 ${libdir}/openvino-${PV}/cache.json \
126 "
127
128# Move inference engine samples into a separate package
129PACKAGES =+ "${PN}-samples"
130
131FILES:${PN}-samples = "${datadir}/openvino \
132 ${bindir} \
133 ${libdir}/libformat_reader.a \
134 ${libdir}/libopencv_c_wrapper.a \
135 "
136RDEPENDS:${PN}-samples += "python3-core"
137
138# Package for inference engine python API
139PACKAGES =+ "${PN}-python3"
140
141FILES:${PN}-python3 = "${PYTHON_SITEPACKAGES_DIR}"
142
143UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+\.\d+\.\d+))$"
diff --git a/lib/oeqa/runtime/cases/cyclictest.py b/lib/oeqa/runtime/cases/cyclictest.py
new file mode 100644
index 00000000..8890651a
--- /dev/null
+++ b/lib/oeqa/runtime/cases/cyclictest.py
@@ -0,0 +1,39 @@
1from oeqa.runtime.case import OERuntimeTestCase
2from oeqa.core.decorator.depends import OETestDepends
3from oeqa.runtime.decorator.package import OEHasPackage
4import os
5import subprocess
6import datetime
7
8class CyclicTest(OERuntimeTestCase):
9
10 @OEHasPackage(['rt-tests'])
11 @OETestDepends(['ssh.SSHTest.test_ssh'])
12 def test_cyclic(self):
13 # Cyclictest command and argument based on public setup for Intel(R) Core(TM) i7-6700
14 # https://www.osadl.org/Latency-plot-of-system-in-rack-9-slot.qa-latencyplot-r9s5.0.html?shadow=1
15 # Command line: cyclictest -l100000000 -m -Sp99 -i200 -h400 -q
16 status, output = self.target.run('cyclictest -l100000000 -m -Sp99 -i200 -h400')
17 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
18 test_log_dir = self.td.get('TEST_LOG_DIR', '')
19
20 if not test_log_dir:
21 test_log_dir = os.path.join(self.td.get('WORKDIR', ''), 'testimage')
22
23 cyclic_log_dir = os.path.join(test_log_dir, '%s.%s' % ('cyclic_test', datetime.datetime.now().strftime('%Y%m%d%H%M%S')))
24 os.makedirs(cyclic_log_dir)
25 log_path = os.path.join(cyclic_log_dir, 'cyclic_log')
26 with open(log_path, 'w') as f:
27 f.write(output)
28
29 max_latency = subprocess.check_output(('grep "Max Latencies" %s | tr " " "\n" | sort -n | tail -1 | sed s/^0*//') % log_path, shell=True).strip()
30 max_latency = int(max_latency)
31
32 # Default target latency based on max latency (24us) captured at public execution multiple by 1.2 (20% buffer)
33 # https://www.osadl.org/Latency-plot-of-system-in-rack-9-slot.qa-latencyplot-r9s5.0.html?shadow=1
34 target_latency = 1.2*24
35 user_defined_target_latency = self.tc.td.get("RTKERNEL_TARGET_LATENCY")
36 if user_defined_target_latency:
37 target_latency = int(user_defined_target_latency)
38 self.assertTrue(max_latency < target_latency,
39 msg="Max latency (%sus) is greater than target (%sus)." % (max_latency, target_latency))
diff --git a/lib/oeqa/runtime/cases/dldt_inference_engine.py b/lib/oeqa/runtime/cases/dldt_inference_engine.py
new file mode 100644
index 00000000..fb35d52f
--- /dev/null
+++ b/lib/oeqa/runtime/cases/dldt_inference_engine.py
@@ -0,0 +1,109 @@
1from oeqa.runtime.case import OERuntimeTestCase
2from oeqa.runtime.decorator.package import OEHasPackage
3from oeqa.core.decorator.depends import OETestDepends
4from oeqa.runtime.miutils.targets.oeqatarget import OEQATarget
5from oeqa.runtime.miutils.tests.squeezenet_model_download_test import SqueezenetModelDownloadTest
6from oeqa.runtime.miutils.tests.dldt_model_optimizer_test import DldtModelOptimizerTest
7from oeqa.runtime.miutils.tests.dldt_inference_engine_test import DldtInferenceEngineTest
8from oeqa.runtime.miutils.dldtutils import get_testdata_config
9
10class DldtInferenceEngine(OERuntimeTestCase):
11
12 @classmethod
13 def setUpClass(cls):
14 cls.sqn_download = SqueezenetModelDownloadTest(OEQATarget(cls.tc.target), '/tmp/ie/md')
15 cls.sqn_download.setup()
16 cls.dldt_mo = DldtModelOptimizerTest(OEQATarget(cls.tc.target), '/tmp/ie/ir')
17 cls.dldt_mo.setup()
18 cls.dldt_ie = DldtInferenceEngineTest(OEQATarget(cls.tc.target), '/tmp/ie/inputs')
19 cls.dldt_ie.setup()
20 cls.ir_files_dir = cls.dldt_mo.work_dir
21
22 @classmethod
23 def tearDownClass(cls):
24 cls.dldt_ie.tear_down()
25 cls.dldt_mo.tear_down()
26 cls.sqn_download.tear_down()
27
28 @OEHasPackage(['dldt-model-optimizer'])
29 @OEHasPackage(['wget'])
30 def test_dldt_ie_can_create_ir_and_download_input(self):
31 proxy_port = get_testdata_config(self.tc.td, 'DLDT_PIP_PROXY')
32 if not proxy_port:
33 self.skipTest('Need to configure bitbake configuration (DLDT_PIP_PROXY="proxy.server:port").')
34 (status, output) = self.sqn_download.test_can_download_squeezenet_model(proxy_port)
35 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
36 (status, output) = self.sqn_download.test_can_download_squeezenet_prototxt(proxy_port)
37 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
38
39 mo_exe_dir = get_testdata_config(self.tc.td, 'DLDT_MO_EXE_DIR')
40 if not mo_exe_dir:
41 self.skipTest('Need to configure bitbake configuration (DLDT_MO_EXE_DIR="directory_to_mo.py").')
42 mo_files_dir = self.sqn_download.work_dir
43 (status, output) = self.dldt_mo.test_dldt_mo_can_create_ir(mo_exe_dir, mo_files_dir)
44 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
45
46 (status, output) = self.dldt_ie.test_can_download_input_file(proxy_port)
47 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
48
49 @OETestDepends(['dldt_inference_engine.DldtInferenceEngine.test_dldt_ie_can_create_ir_and_download_input'])
50 @OEHasPackage(['dldt-inference-engine'])
51 @OEHasPackage(['dldt-inference-engine-samples'])
52 def test_dldt_ie_classification_with_cpu(self):
53 (status, output) = self.dldt_ie.test_dldt_ie_classification_with_device('CPU', self.ir_files_dir)
54 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
55
56 @OETestDepends(['dldt_inference_engine.DldtInferenceEngine.test_dldt_ie_can_create_ir_and_download_input'])
57 @OEHasPackage(['dldt-inference-engine'])
58 @OEHasPackage(['dldt-inference-engine-samples'])
59 @OEHasPackage(['intel-compute-runtime'])
60 @OEHasPackage(['ocl-icd'])
61 def test_dldt_ie_classification_with_gpu(self):
62 (status, output) = self.dldt_ie.test_dldt_ie_classification_with_device('GPU', self.ir_files_dir)
63 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
64
65 @OETestDepends(['dldt_inference_engine.DldtInferenceEngine.test_dldt_ie_can_create_ir_and_download_input'])
66 @OEHasPackage(['dldt-inference-engine'])
67 @OEHasPackage(['dldt-inference-engine-samples'])
68 @OEHasPackage(['dldt-inference-engine-vpu-firmware'])
69 def test_dldt_ie_classification_with_myriad(self):
70 device = 'MYRIAD'
71 (status, output) = self.dldt_ie.test_check_if_openvino_device_available(device)
72 if not status:
73 self.skipTest('OpenVINO %s device not available on target machine(availalbe devices: %s)' % (device, output))
74 (status, output) = self.dldt_ie.test_dldt_ie_classification_with_device(device, self.ir_files_dir)
75 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
76
77 @OETestDepends(['dldt_inference_engine.DldtInferenceEngine.test_dldt_ie_can_create_ir_and_download_input'])
78 @OEHasPackage(['dldt-inference-engine'])
79 @OEHasPackage(['dldt-inference-engine-python3'])
80 @OEHasPackage(['python3-opencv'])
81 @OEHasPackage(['python3-numpy'])
82 def test_dldt_ie_classification_python_api_with_cpu(self):
83 (status, output) = self.dldt_ie.test_dldt_ie_classification_python_api_with_device('CPU', self.ir_files_dir)
84 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
85
86 @OETestDepends(['dldt_inference_engine.DldtInferenceEngine.test_dldt_ie_can_create_ir_and_download_input'])
87 @OEHasPackage(['dldt-inference-engine'])
88 @OEHasPackage(['dldt-inference-engine-python3'])
89 @OEHasPackage(['intel-compute-runtime'])
90 @OEHasPackage(['ocl-icd'])
91 @OEHasPackage(['python3-opencv'])
92 @OEHasPackage(['python3-numpy'])
93 def test_dldt_ie_classification_python_api_with_gpu(self):
94 (status, output) = self.dldt_ie.test_dldt_ie_classification_python_api_with_device('GPU', self.ir_files_dir)
95 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
96
97 @OETestDepends(['dldt_inference_engine.DldtInferenceEngine.test_dldt_ie_can_create_ir_and_download_input'])
98 @OEHasPackage(['dldt-inference-engine'])
99 @OEHasPackage(['dldt-inference-engine-python3'])
100 @OEHasPackage(['dldt-inference-engine-vpu-firmware'])
101 @OEHasPackage(['python3-opencv'])
102 @OEHasPackage(['python3-numpy'])
103 def test_dldt_ie_classification_python_api_with_myriad(self):
104 device = 'MYRIAD'
105 (status, output) = self.dldt_ie.test_check_if_openvino_device_available(device)
106 if not status:
107 self.skipTest('OpenVINO %s device not available on target machine(availalbe devices: %s)' % (device, output))
108 (status, output) = self.dldt_ie.test_dldt_ie_classification_python_api_with_device(device, self.ir_files_dir)
109 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
diff --git a/lib/oeqa/runtime/cases/dldt_model_optimizer.py b/lib/oeqa/runtime/cases/dldt_model_optimizer.py
new file mode 100644
index 00000000..736ea661
--- /dev/null
+++ b/lib/oeqa/runtime/cases/dldt_model_optimizer.py
@@ -0,0 +1,38 @@
1from oeqa.runtime.case import OERuntimeTestCase
2from oeqa.runtime.decorator.package import OEHasPackage
3from oeqa.runtime.miutils.targets.oeqatarget import OEQATarget
4from oeqa.runtime.miutils.tests.squeezenet_model_download_test import SqueezenetModelDownloadTest
5from oeqa.runtime.miutils.tests.dldt_model_optimizer_test import DldtModelOptimizerTest
6from oeqa.runtime.miutils.dldtutils import get_testdata_config
7
8class DldtModelOptimizer(OERuntimeTestCase):
9
10 @classmethod
11 def setUpClass(cls):
12 cls.sqn_download = SqueezenetModelDownloadTest(OEQATarget(cls.tc.target), '/tmp/mo/md')
13 cls.sqn_download.setup()
14 cls.dldt_mo = DldtModelOptimizerTest(OEQATarget(cls.tc.target), '/tmp/mo/ir')
15 cls.dldt_mo.setup()
16
17 @classmethod
18 def tearDownClass(cls):
19 cls.dldt_mo.tear_down()
20 cls.sqn_download.tear_down()
21
22 @OEHasPackage(['dldt-model-optimizer'])
23 @OEHasPackage(['wget'])
24 def test_dldt_mo_can_create_ir(self):
25 proxy_port = get_testdata_config(self.tc.td, 'DLDT_PIP_PROXY')
26 if not proxy_port:
27 self.skipTest('Need to configure bitbake configuration (DLDT_PIP_PROXY="proxy.server:port").')
28 (status, output) = self.sqn_download.test_can_download_squeezenet_model(proxy_port)
29 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
30 (status, output) = self.sqn_download.test_can_download_squeezenet_prototxt(proxy_port)
31 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
32
33 mo_exe_dir = get_testdata_config(self.tc.td, 'DLDT_MO_EXE_DIR')
34 if not mo_exe_dir:
35 self.skipTest('Need to configure bitbake configuration (DLDT_MO_EXE_DIR="directory_to_mo.py").')
36 mo_files_dir = self.sqn_download.work_dir
37 (status, output) = self.dldt_mo.test_dldt_mo_can_create_ir(mo_exe_dir, mo_files_dir)
38 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
diff --git a/lib/oeqa/runtime/cases/intel_mediasdk.py b/lib/oeqa/runtime/cases/intel_mediasdk.py
new file mode 100644
index 00000000..4ae7d580
--- /dev/null
+++ b/lib/oeqa/runtime/cases/intel_mediasdk.py
@@ -0,0 +1,34 @@
1from oeqa.runtime.case import OERuntimeTestCase
2from oeqa.runtime.decorator.package import OEHasPackage
3from oeqa.core.decorator.depends import OETestDepends
4
5class MsdkTest(OERuntimeTestCase):
6
7 @classmethod
8 def tearDownClass(cls):
9 cls.tc.target.run("rm /tmp/mtest_h264.mp4")
10
11 @OEHasPackage(['gstreamer1.0-plugins-base'])
12 @OEHasPackage(['gstreamer1.0-plugins-good'])
13 @OEHasPackage(['gstreamer1.0-plugins-bad'])
14 @OEHasPackage(['intel-mediasdk'])
15 @OEHasPackage(['intel-media-driver', 'libigfxcmrt7'])
16 def test_gstreamer_can_encode_with_msdk_and_intel_media_driver(self):
17 (status, output) = self.target.run('gst-inspect-1.0 msdk')
18 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
19
20 (status, output) = self.target.run('export LIBVA_DRIVER_NAME=iHD; '
21 'gst-launch-1.0 -ev videotestsrc num-buffers=120 ! timeoverlay ! '
22 'msdkh264enc ! video/x-h264,profile=main ! h264parse ! '
23 'filesink location=/tmp/mtest_h264.mp4')
24 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
25
26 @OETestDepends(['intel_mediasdk.MsdkTest.test_gstreamer_can_encode_with_msdk_and_intel_media_driver'])
27 def test_gstreamer_can_decode_with_msdk_and_intel_media_driver(self):
28 (status, output) = self.target.run('export LIBVA_DRIVER_NAME=iHD; '
29 'gst-launch-1.0 filesrc location=/tmp/mtest_h264.mp4 ! '
30 'h264parse ! msdkh264dec ! '
31 'msdkh265enc rate-control=cbr bitrate=5000 gop-size=30 b-frames=2 ! '
32 'video/x-h265,profile=main ! h265parse ! fakesink')
33 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
34
diff --git a/lib/oeqa/runtime/cases/intel_vaapi_driver.py b/lib/oeqa/runtime/cases/intel_vaapi_driver.py
new file mode 100644
index 00000000..31e11a81
--- /dev/null
+++ b/lib/oeqa/runtime/cases/intel_vaapi_driver.py
@@ -0,0 +1,27 @@
1from oeqa.runtime.case import OERuntimeTestCase
2from oeqa.runtime.decorator.package import OEHasPackage
3from oeqa.core.decorator.depends import OETestDepends
4
5class VaapiDriverTest(OERuntimeTestCase):
6
7 @classmethod
8 def tearDownClass(cls):
9 cls.tc.target.run("rm /tmp/vtest_h264.mp4")
10
11 @OEHasPackage(['gstreamer1.0-plugins-base'])
12 @OEHasPackage(['gstreamer1.0-plugins-good'])
13 @OEHasPackage(['gstreamer1.0-vaapi'])
14 @OEHasPackage(['intel-vaapi-driver'])
15 def test_gstreamer_can_encode_with_intel_vaapi_driver(self):
16 (status, output) = self.target.run('gst-inspect-1.0 vaapi')
17 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
18
19 (status, output) = self.target.run('gst-launch-1.0 -ev videotestsrc num-buffers=60 ! '
20 'timeoverlay ! vaapih264enc ! h264parse ! mp4mux ! filesink location=/tmp/vtest_h264.mp4')
21 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
22
23 @OETestDepends(['intel_vaapi_driver.VaapiDriverTest.test_gstreamer_can_encode_with_intel_vaapi_driver'])
24 def test_gstreamer_can_decode_with_intel_vaapi_driver(self):
25 (status, output) = self.target.run('gst-launch-1.0 filesrc location=/tmp/vtest_h264.mp4 ! '
26 'qtdemux ! h264parse ! vaapih264dec ! vaapisink')
27 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
diff --git a/lib/oeqa/runtime/cases/isal.py b/lib/oeqa/runtime/cases/isal.py
new file mode 100644
index 00000000..5025f986
--- /dev/null
+++ b/lib/oeqa/runtime/cases/isal.py
@@ -0,0 +1,24 @@
1import os
2from oeqa.runtime.decorator.package import OEHasPackage
3from oeqa.runtime.case import OERuntimeTestCase
4from oeqa.core.decorator.depends import OETestDepends
5
6class IsalTest(OERuntimeTestCase):
7
8 @OEHasPackage(['isa-l'])
9 def test_isal_igzip_version(self):
10 command = 'igzip -V'
11 (status, output) = self.target.run(command)
12 self.assertEqual(status, 0, msg="Error messages: %s" % output)
13
14 @OETestDepends(['isal.IsalTest.test_isal_igzip_version'])
15 def test_isal_igzip_can_compress(self):
16 command = 'echo "hello" > /tmp/igzip_sample'
17 (status, output) = self.target.run(command)
18 self.assertEqual(status, 0, msg="Error messages: %s" % output)
19 command = 'igzip -z /tmp/igzip_sample'
20 (status, output) = self.target.run(command)
21 self.assertEqual(status, 0, msg="Error messages: %s" % output)
22 command = 'rm /tmp/igzip_sample*'
23 (status, output) = self.target.run(command)
24 self.assertEqual(status, 0, msg="Error messages: %s" % output)
diff --git a/lib/oeqa/runtime/cases/libipt.py b/lib/oeqa/runtime/cases/libipt.py
new file mode 100644
index 00000000..4adb13f0
--- /dev/null
+++ b/lib/oeqa/runtime/cases/libipt.py
@@ -0,0 +1,23 @@
1from oeqa.runtime.case import OERuntimeTestCase
2from oeqa.runtime.decorator.package import OEHasPackage
3from oeqa.core.decorator.depends import OETestDepends
4
5class LibiptTest(OERuntimeTestCase):
6 libipt_bin_dir = '/usr/bin/libipt/'
7
8 @classmethod
9 def tearDownClass(cls):
10 cls.tc.target.run('rm /tmp/loop-tnt*')
11
12 @OEHasPackage(['libipt', 'libipt2'])
13 @OEHasPackage(['libipt-test'])
14 @OEHasPackage(['yasm'])
15 def test_libipt_can_generate_trace_packet(self):
16 (status, output) = self.target.run('cd /tmp; %spttc %s/tests/loop-tnt.ptt' %
17 (self.libipt_bin_dir, self.libipt_bin_dir))
18 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
19
20 @OETestDepends(['libipt.LibiptTest.test_libipt_can_generate_trace_packet'])
21 def test_libipt_can_perform_trace_packet_dump(self):
22 (status, output) = self.target.run('cd /tmp; %sptdump loop-tnt.pt' % self.libipt_bin_dir)
23 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
diff --git a/lib/oeqa/runtime/cases/libxcam.py b/lib/oeqa/runtime/cases/libxcam.py
new file mode 100644
index 00000000..57192f07
--- /dev/null
+++ b/lib/oeqa/runtime/cases/libxcam.py
@@ -0,0 +1,37 @@
1from oeqa.runtime.case import OERuntimeTestCase
2from oeqa.runtime.decorator.package import OEHasPackage
3from oeqa.core.decorator.depends import OETestDepends
4
5class LibxcamTest(OERuntimeTestCase):
6 yuv_file = 'vtest.yuv'
7 soft_test_app_file = 'test-soft-image'
8 libxcam_test_app_dir = '/usr/bin/libxcam/'
9 libxcam_file_dir = '/tmp/'
10
11 @classmethod
12 def tearDownClass(cls):
13 cls.tc.target.run("rm %s%s" % (cls.libxcam_file_dir, cls.yuv_file))
14
15 @OEHasPackage(['gstreamer1.0-plugins-base'])
16 @OEHasPackage(['gstreamer1.0-plugins-good'])
17 @OEHasPackage(['gstreamer1.0-vaapi'])
18 @OEHasPackage(['intel-vaapi-driver'])
19 def test_libxcam_can_generate_yuv_file_with_gstreamer(self):
20 (status, output) = self.target.run('gst-inspect-1.0 vaapi')
21 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
22
23 (status, output) = self.target.run('gst-launch-1.0 -ev videotestsrc num-buffers=60 ! '
24 'timeoverlay ! filesink location=%s%s' %
25 (self.libxcam_file_dir, self.yuv_file))
26 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
27
28 @OEHasPackage(['libxcam'])
29 @OEHasPackage(['libxcam-test'])
30 @OETestDepends(['libxcam.LibxcamTest.test_libxcam_can_generate_yuv_file_with_gstreamer'])
31 def test_libxcam_can_execute_soft_image_sample_app(self):
32 (status, output) = self.target.run('%s%s --type remap --input0 %s%s --output soft_out.nv12 --save false' %
33 (self.libxcam_test_app_dir,
34 self.soft_test_app_file,
35 self.libxcam_file_dir,
36 self.yuv_file))
37 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
diff --git a/lib/oeqa/runtime/cases/microcode.py b/lib/oeqa/runtime/cases/microcode.py
new file mode 100644
index 00000000..52c1cdb4
--- /dev/null
+++ b/lib/oeqa/runtime/cases/microcode.py
@@ -0,0 +1,31 @@
1from oeqa.runtime.case import OERuntimeTestCase
2from oeqa.runtime.decorator.package import OEHasPackage
3import re
4
5class MicrocodeTest(OERuntimeTestCase):
6
7 def get_revision_from_microcode_string_list(self, microcode_string_list, re_pattern):
8 re_compile = re.compile(re_pattern)
9 rev_list = []
10 for s in microcode_string_list:
11 matched_revs = re_compile.findall(s)
12 if matched_revs:
13 for mr in matched_revs:
14 rev_list.append(int(mr, 16))
15 return rev_list
16
17 @OEHasPackage(["iucode-tool"])
18 def test_microcode_update(self):
19 (status, output) = self.target.run('iucode_tool /lib/firmware/intel-ucode/ -tb -l --scan-system=2 | grep rev')
20
21 selected_microcodes = output.splitlines()
22 selected_rev_list = self.get_revision_from_microcode_string_list(selected_microcodes, "rev (\w*)")
23
24 (status, output) = self.target.run("dmesg | grep 'microcode updated early'")
25
26 updated_microcodes = output.splitlines()
27 updated_rev_list = self.get_revision_from_microcode_string_list(updated_microcodes, "revision (\w*)")
28
29 for ul in updated_rev_list:
30 self.assertTrue(ul in selected_rev_list, msg="Updated revision, %s, not in selected revision list (%s)" %
31 (ul, selected_rev_list))
diff --git a/lib/oeqa/runtime/cases/mkl_dnn.py b/lib/oeqa/runtime/cases/mkl_dnn.py
new file mode 100644
index 00000000..8d50df54
--- /dev/null
+++ b/lib/oeqa/runtime/cases/mkl_dnn.py
@@ -0,0 +1,67 @@
1from oeqa.runtime.case import OERuntimeTestCase
2from oeqa.runtime.decorator.package import OEHasPackage
3from oeqa.core.decorator.depends import OETestDepends
4from oeqa.runtime.miutils.targets.oeqatarget import OEQATarget
5from oeqa.runtime.miutils.tests.mkl_dnn_test import MkldnnTest
6
7class MklDnn(OERuntimeTestCase):
8
9 @classmethod
10 def setUpClass(cls):
11 cls.mkldnntest = MkldnnTest(OEQATarget(cls.tc.target))
12
13 @classmethod
14 def tearDownClass(cls):
15 cls.mkldnntest.tear_down()
16
17 @OEHasPackage(['onednn', 'libdnnl2'])
18 @OEHasPackage(['onednn-src', 'libdnnl-src'])
19 @OEHasPackage(['onednn-dev', 'libdnnl-dev'])
20 @OEHasPackage(['gcc'])
21 @OEHasPackage(['gcc-symlinks'])
22 @OEHasPackage(['libstdc++-dev'])
23 @OEHasPackage(['binutils'])
24 def test_mkldnn_can_compile_and_execute(self):
25 (status, output) = self.mkldnntest.test_mkldnn_can_compile_and_execute()
26 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
27
28 @OEHasPackage(['onednn', 'libdnnl2'])
29 @OEHasPackage(['onednn-test', 'libdnnl-test'])
30 def test_mkldnn_benchdnn_package_available(self):
31 (status, output) = self.mkldnntest.test_mkldnn_benchdnn_package_available()
32 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
33
34 @OETestDepends(['mkl_dnn.MklDnn.test_mkldnn_benchdnn_package_available'])
35 def test_mkldnn_conv_api(self):
36 (status, output) = self.mkldnntest.test_mkldnn_conv_api()
37 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
38
39 @OETestDepends(['mkl_dnn.MklDnn.test_mkldnn_benchdnn_package_available'])
40 def test_mkldnn_bnorm_api(self):
41 (status, output) = self.mkldnntest.test_mkldnn_bnorm_api()
42 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
43
44 @OETestDepends(['mkl_dnn.MklDnn.test_mkldnn_benchdnn_package_available'])
45 def test_mkldnn_deconv_api(self):
46 (status, output) = self.mkldnntest.test_mkldnn_deconv_api()
47 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
48
49 @OETestDepends(['mkl_dnn.MklDnn.test_mkldnn_benchdnn_package_available'])
50 def test_mkldnn_ip_api(self):
51 (status, output) = self.mkldnntest.test_mkldnn_ip_api()
52 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
53
54 @OETestDepends(['mkl_dnn.MklDnn.test_mkldnn_benchdnn_package_available'])
55 def test_mkldnn_reorder_api(self):
56 (status, output) = self.mkldnntest.test_mkldnn_reorder_api()
57 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
58
59 @OETestDepends(['mkl_dnn.MklDnn.test_mkldnn_benchdnn_package_available'])
60 def test_mkldnn_rnn_api(self):
61 (status, output) = self.mkldnntest.test_mkldnn_rnn_api()
62 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
63
64 @OETestDepends(['mkl_dnn.MklDnn.test_mkldnn_benchdnn_package_available'])
65 def test_mkldnn_shuffle_api(self):
66 (status, output) = self.mkldnntest.test_mkldnn_shuffle_api()
67 self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output))
diff --git a/lib/oeqa/runtime/cases/parselogs-ignores-intel-core2-32.txt b/lib/oeqa/runtime/cases/parselogs-ignores-intel-core2-32.txt
new file mode 100644
index 00000000..84ce8168
--- /dev/null
+++ b/lib/oeqa/runtime/cases/parselogs-ignores-intel-core2-32.txt
@@ -0,0 +1,9 @@
1# These should be reviewed to see if they are still needed
2ACPI: No _BQC method, cannot determine initial brightness
3[Firmware Bug]: ACPI: No _BQC method, cannot determine initial brightness
4(EE) Failed to load module "psb"
5(EE) Failed to load module "psbdrv"
6(EE) open /dev/fb0: No such file or directory
7(EE) AIGLX: reverting to software rendering
8dmi: Firmware registration failed.
9ioremap error for 0x78
diff --git a/lib/oeqa/runtime/cases/parselogs-ignores-intel-corei7-64.txt b/lib/oeqa/runtime/cases/parselogs-ignores-intel-corei7-64.txt
new file mode 100644
index 00000000..5c9b4bc7
--- /dev/null
+++ b/lib/oeqa/runtime/cases/parselogs-ignores-intel-corei7-64.txt
@@ -0,0 +1,14 @@
1# These should be reviewed to see if they are still needed
2can't set Max Payload Size to 256
3intel_punit_ipc: can't request region for resource
4[drm] parse error at position 4 in video mode 'efifb'
5ACPI Error: Could not enable RealTimeClock event
6ACPI Warning: Could not enable fixed event - RealTimeClock
7hci_intel INT33E1:00: Unable to retrieve gpio
8hci_intel: probe of INT33E1:00 failed
9can't derive routing for PCI INT A
10failed to read out thermal zone
11Bluetooth: hci0: Setting Intel event mask failed
12ttyS2 - failed to request DMA
13Bluetooth: hci0: Failed to send firmware data (-38)
14atkbd serio0: Failed to enable keyboard on isa0060/serio0
diff --git a/lib/oeqa/runtime/cases/thermald.py b/lib/oeqa/runtime/cases/thermald.py
new file mode 100644
index 00000000..a0b6a92b
--- /dev/null
+++ b/lib/oeqa/runtime/cases/thermald.py
@@ -0,0 +1,47 @@
1from oeqa.runtime.case import OERuntimeTestCase
2from oeqa.core.decorator.depends import OETestDepends
3from oeqa.runtime.decorator.package import OEHasPackage
4import threading
5import time
6import re
7
8class ThermaldTest(OERuntimeTestCase):
9 def get_thermal_zone_with_target_type(self, target_type):
10 i = 0
11 while True:
12 status, output = self.target.run('cat /sys/class/thermal/thermal_zone%s/type' % i)
13 if status:
14 return -1
15 if output == target_type:
16 return i
17 i = i + 1
18
19 def run_thermald_emulation_to_exceed_setpoint_then_end_thermald_process(self, run_args):
20 time.sleep(2)
21 self.target.run('echo 106000 > /sys/class/thermal/thermal_zone%s/emul_temp' % run_args)
22 time.sleep(5)
23 __, output = self.target.run('pidof thermald')
24 self.target.run('kill -9 %s' % output)
25
26 def test_thermald_emulation_mode(self):
27 # Thermald test depend on thermal emulation, where CONFIG_THERMAL_EMULATION=y was required
28 # To enable thermal emulation, refer to https://github.com/intel/thermal_daemon/blob/master/test/readme_test.txt
29 (status, output) = self.target.run('gzip -dc /proc/config.gz | grep CONFIG_THERMAL_EMULATION=y')
30 if status:
31 self.skipTest("CONFIG_THERMAL_EMULATION is not set")
32
33 @OEHasPackage(['thermald'])
34 @OETestDepends(['thermald.ThermaldTest.test_thermald_emulation_mode'])
35 def test_thermald_can_track_thermal_exceed_setpoint(self):
36 x86_thermal_zone_index = self.get_thermal_zone_with_target_type('x86_pkg_temp')
37 if x86_thermal_zone_index < 0:
38 self.skipTest('Could not get the thermal zone index for target type (%s)' % 'x86_pkg_temp')
39 td_thread = threading.Thread(target=self.run_thermald_emulation_to_exceed_setpoint_then_end_thermald_process,
40 args=(x86_thermal_zone_index,))
41 td_thread.start()
42 td_thread.join()
43 status, output = self.target.run('timeout 3s thermald --no-daemon --loglevel=info')
44 regex_search = ".*thd_cdev_set_state.*106000"
45 regex_comp = re.compile(regex_search)
46 m = regex_comp.search(output)
47 self.assertTrue(m, msg='status and output: %s and %s' % (status, output))
diff --git a/lib/oeqa/runtime/files/dldt-inference-engine/classification_sample.py b/lib/oeqa/runtime/files/dldt-inference-engine/classification_sample.py
new file mode 100644
index 00000000..1906e9fe
--- /dev/null
+++ b/lib/oeqa/runtime/files/dldt-inference-engine/classification_sample.py
@@ -0,0 +1,135 @@
1#!/usr/bin/env python3
2"""
3 Copyright (C) 2018-2019 Intel Corporation
4
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
8
9 http://www.apache.org/licenses/LICENSE-2.0
10
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16"""
17from __future__ import print_function
18import sys
19import os
20from argparse import ArgumentParser, SUPPRESS
21import cv2
22import numpy as np
23import logging as log
24from time import time
25from openvino.inference_engine import IENetwork, IECore
26
27
28def build_argparser():
29 parser = ArgumentParser(add_help=False)
30 args = parser.add_argument_group('Options')
31 args.add_argument('-h', '--help', action='help', default=SUPPRESS, help='Show this help message and exit.')
32 args.add_argument("-m", "--model", help="Required. Path to an .xml file with a trained model.", required=True,
33 type=str)
34 args.add_argument("-i", "--input", help="Required. Path to a folder with images or path to an image files",
35 required=True,
36 type=str, nargs="+")
37 args.add_argument("-l", "--cpu_extension",
38 help="Optional. Required for CPU custom layers. "
39 "MKLDNN (CPU)-targeted custom layers. Absolute path to a shared library with the"
40 " kernels implementations.", type=str, default=None)
41 args.add_argument("-d", "--device",
42 help="Optional. Specify the target device to infer on; CPU, GPU, FPGA, HDDL, MYRIAD or HETERO: is "
43 "acceptable. The sample will look for a suitable plugin for device specified. Default "
44 "value is CPU",
45 default="CPU", type=str)
46 args.add_argument("--labels", help="Optional. Path to a labels mapping file", default=None, type=str)
47 args.add_argument("-nt", "--number_top", help="Optional. Number of top results", default=10, type=int)
48
49 return parser
50
51
52def main():
53 log.basicConfig(format="[ %(levelname)s ] %(message)s", level=log.INFO, stream=sys.stdout)
54 args = build_argparser().parse_args()
55 model_xml = args.model
56 model_bin = os.path.splitext(model_xml)[0] + ".bin"
57
58 # Plugin initialization for specified device and load extensions library if specified
59 log.info("Creating Inference Engine")
60 ie = IECore()
61 if args.cpu_extension and 'CPU' in args.device:
62 ie.add_extension(args.cpu_extension, "CPU")
63 # Read IR
64 log.info("Loading network files:\n\t{}\n\t{}".format(model_xml, model_bin))
65 net = IENetwork(model=model_xml, weights=model_bin)
66
67 if "CPU" in args.device:
68 supported_layers = ie.query_network(net, "CPU")
69 not_supported_layers = [l for l in net.layers.keys() if l not in supported_layers]
70 if len(not_supported_layers) != 0:
71 log.error("Following layers are not supported by the plugin for specified device {}:\n {}".
72 format(args.device, ', '.join(not_supported_layers)))
73 log.error("Please try to specify cpu extensions library path in sample's command line parameters using -l "
74 "or --cpu_extension command line argument")
75 sys.exit(1)
76
77 assert len(net.inputs.keys()) == 1, "Sample supports only single input topologies"
78 assert len(net.outputs) == 1, "Sample supports only single output topologies"
79
80 log.info("Preparing input blobs")
81 input_blob = next(iter(net.inputs))
82 out_blob = next(iter(net.outputs))
83 net.batch_size = len(args.input)
84
85 # Read and pre-process input images
86 n, c, h, w = net.inputs[input_blob].shape
87 images = np.ndarray(shape=(n, c, h, w))
88 for i in range(n):
89 image = cv2.imread(args.input[i])
90 if image.shape[:-1] != (h, w):
91 log.warning("Image {} is resized from {} to {}".format(args.input[i], image.shape[:-1], (h, w)))
92 image = cv2.resize(image, (w, h))
93 image = image.transpose((2, 0, 1)) # Change data layout from HWC to CHW
94 images[i] = image
95 log.info("Batch size is {}".format(n))
96
97 # Loading model to the plugin
98 log.info("Loading model to the plugin")
99 exec_net = ie.load_network(network=net, device_name=args.device)
100
101 # Start sync inference
102 log.info("Starting inference in synchronous mode")
103 res = exec_net.infer(inputs={input_blob: images})
104
105 # Processing output blob
106 log.info("Processing output blob")
107 res = res[out_blob]
108 log.info("Top {} results: ".format(args.number_top))
109 if args.labels:
110 with open(args.labels, 'r') as f:
111 labels_map = [x.split(sep=' ', maxsplit=1)[-1].strip() for x in f]
112 else:
113 labels_map = None
114 classid_str = "classid"
115 probability_str = "probability"
116 for i, probs in enumerate(res):
117 probs = np.squeeze(probs)
118 top_ind = np.argsort(probs)[-args.number_top:][::-1]
119 print("Image {}\n".format(args.input[i]))
120 print(classid_str, probability_str)
121 print("{} {}".format('-' * len(classid_str), '-' * len(probability_str)))
122 for id in top_ind:
123 det_label = labels_map[id] if labels_map else "{}".format(id)
124 label_length = len(det_label)
125 space_num_before = (len(classid_str) - label_length) // 2
126 space_num_after = len(classid_str) - (space_num_before + label_length) + 2
127 space_num_before_prob = (len(probability_str) - len(str(probs[id]))) // 2
128 print("{}{}{}{}{:.7f}".format(' ' * space_num_before, det_label,
129 ' ' * space_num_after, ' ' * space_num_before_prob,
130 probs[id]))
131 print("\n")
132 log.info("This sample is an API example, for any performance measurements please use the dedicated benchmark_app tool\n")
133
134if __name__ == '__main__':
135 sys.exit(main() or 0)
diff --git a/lib/oeqa/runtime/miutils/dldtutils.py b/lib/oeqa/runtime/miutils/dldtutils.py
new file mode 100644
index 00000000..45bf2e12
--- /dev/null
+++ b/lib/oeqa/runtime/miutils/dldtutils.py
@@ -0,0 +1,3 @@
1
2def get_testdata_config(testdata, config):
3 return testdata.get(config)
diff --git a/lib/oeqa/runtime/miutils/targets/oeqatarget.py b/lib/oeqa/runtime/miutils/targets/oeqatarget.py
new file mode 100644
index 00000000..a9f7f1b4
--- /dev/null
+++ b/lib/oeqa/runtime/miutils/targets/oeqatarget.py
@@ -0,0 +1,11 @@
1
2class OEQATarget(object):
3
4 def __init__(self, target):
5 self.target = target
6
7 def run(self, cmd):
8 return self.target.run(cmd)
9
10 def copy_to(self, source, destination_dir):
11 self.target.copyTo(source, destination_dir)
diff --git a/lib/oeqa/runtime/miutils/tests/dldt_inference_engine_test.py b/lib/oeqa/runtime/miutils/tests/dldt_inference_engine_test.py
new file mode 100644
index 00000000..31bfb539
--- /dev/null
+++ b/lib/oeqa/runtime/miutils/tests/dldt_inference_engine_test.py
@@ -0,0 +1,56 @@
1import os
2script_path = os.path.dirname(os.path.realpath(__file__))
3files_path = os.path.join(script_path, '../../files/')
4
5class DldtInferenceEngineTest(object):
6 ie_input_files = {'ie_python_sample': 'classification_sample.py',
7 'input': 'chicky_512.png',
8 'input_download': 'https://raw.githubusercontent.com/opencv/opencv/master/samples/data/chicky_512.png',
9 'model': 'squeezenet_v1.1.xml'}
10
11 def __init__(self, target, work_dir):
12 self.target = target
13 self.work_dir = work_dir
14
15 def setup(self):
16 self.target.run('mkdir -p %s' % self.work_dir)
17 self.target.copy_to(os.path.join(files_path, 'dldt-inference-engine', self.ie_input_files['ie_python_sample']),
18 self.work_dir)
19 python_cmd = 'from openvino.inference_engine import IENetwork, IECore; ie = IECore(); print(ie.available_devices)'
20 __, output = self.target.run('python3 -c "%s"' % python_cmd)
21 self.available_devices = output
22
23 def tear_down(self):
24 self.target.run('rm -rf %s' % self.work_dir)
25
26 def test_check_if_openvino_device_available(self, device):
27 if device not in self.available_devices:
28 return False, self.available_devices
29 return True, self.available_devices
30
31 def test_can_download_input_file(self, proxy_port):
32 return self.target.run('cd %s; wget %s -e https_proxy=%s' %
33 (self.work_dir,
34 self.ie_input_files['input_download'],
35 proxy_port))
36
37 def test_dldt_ie_classification_with_device(self, device, ir_files_dir):
38 return self.target.run('classification_sample_async -d %s -i %s -m %s' %
39 (device,
40 os.path.join(self.work_dir, self.ie_input_files['input']),
41 os.path.join(ir_files_dir, self.ie_input_files['model'])))
42
43 def test_dldt_ie_classification_python_api_with_device(self, device, ir_files_dir, extension=''):
44 if extension:
45 return self.target.run('python3 %s -d %s -i %s -m %s -l %s' %
46 (os.path.join(self.work_dir, self.ie_input_files['ie_python_sample']),
47 device,
48 os.path.join(self.work_dir, self.ie_input_files['input']),
49 os.path.join(ir_files_dir, self.ie_input_files['model']),
50 extension))
51 else:
52 return self.target.run('python3 %s -d %s -i %s -m %s' %
53 (os.path.join(self.work_dir, self.ie_input_files['ie_python_sample']),
54 device,
55 os.path.join(self.work_dir, self.ie_input_files['input']),
56 os.path.join(ir_files_dir, self.ie_input_files['model'])))
diff --git a/lib/oeqa/runtime/miutils/tests/dldt_model_optimizer_test.py b/lib/oeqa/runtime/miutils/tests/dldt_model_optimizer_test.py
new file mode 100644
index 00000000..7d3db15b
--- /dev/null
+++ b/lib/oeqa/runtime/miutils/tests/dldt_model_optimizer_test.py
@@ -0,0 +1,23 @@
1import os
2
3class DldtModelOptimizerTest(object):
4 mo_input_files = {'model': 'squeezenet_v1.1.caffemodel',
5 'prototxt': 'deploy.prototxt'}
6 mo_exe = 'mo.py'
7
8 def __init__(self, target, work_dir):
9 self.target = target
10 self.work_dir = work_dir
11
12 def setup(self):
13 self.target.run('mkdir -p %s' % self.work_dir)
14
15 def tear_down(self):
16 self.target.run('rm -rf %s' % self.work_dir)
17
18 def test_dldt_mo_can_create_ir(self, mo_exe_dir, mo_files_dir):
19 return self.target.run('python3 %s --input_model %s --input_proto %s --output_dir %s --data_type FP16' %
20 (os.path.join(mo_exe_dir, self.mo_exe),
21 os.path.join(mo_files_dir, self.mo_input_files['model']),
22 os.path.join(mo_files_dir, self.mo_input_files['prototxt']),
23 self.work_dir))
diff --git a/lib/oeqa/runtime/miutils/tests/mkl_dnn_test.py b/lib/oeqa/runtime/miutils/tests/mkl_dnn_test.py
new file mode 100644
index 00000000..869a4cbe
--- /dev/null
+++ b/lib/oeqa/runtime/miutils/tests/mkl_dnn_test.py
@@ -0,0 +1,55 @@
1
2class MkldnnTest(object):
3 mkldnn_target_test_filename = 'mkl-dnn-c'
4
5 def __init__(self, target):
6 self.target = target
7
8 def tear_down(self):
9 self.target.run('rm /tmp/%s' % self.mkldnn_target_test_filename)
10
11 def test_mkldnn_can_compile_and_execute(self):
12 mkldnn_src_dir = '/usr/src/debug/onednn/'
13 mkldnn_src_test_filename = 'api.c'
14 mkldnn_src_test_file = ''
15
16 (__, output) = self.target.run('cd %s; find -name %s' % (mkldnn_src_dir, mkldnn_src_test_filename))
17 if 'No such file or directory' in output:
18 return -1, output
19
20 mkldnn_src_test_file = os.path.join(mkldnn_src_dir, output)
21 (status, output) = self.target.run('gcc %s -o /tmp/%s -ldnnl' % (mkldnn_src_test_file, self.mkldnn_target_test_filename))
22 if status:
23 return status, output
24
25 (status, output) = self.target.run('cd /tmp; ./%s' % self.mkldnn_target_test_filename)
26 return status, output
27
28 def test_mkldnn_benchdnn_package_available(self):
29 (status, output) = self.target.run('ls /usr/bin/mkl-dnn/tests/benchdnn')
30 return status, output
31
32 def _run_mkldnn_benchdnn_test(self, cmd):
33 (status, output) = self.target.run('cd /usr/bin/mkl-dnn/tests/benchdnn; %s' % cmd)
34 return status, output
35
36 def test_mkldnn_conv_api(self):
37 return self._run_mkldnn_benchdnn_test('./benchdnn --conv --batch=inputs/conv/test_conv_3d')
38
39 def test_mkldnn_bnorm_api(self):
40 return self._run_mkldnn_benchdnn_test('./benchdnn --bnorm --batch=inputs/bnorm/test_bnorm_regressions')
41
42 def test_mkldnn_deconv_api(self):
43 return self._run_mkldnn_benchdnn_test('./benchdnn --deconv --batch=inputs/deconv/test_deconv_bfloat16')
44
45 def test_mkldnn_ip_api(self):
46 return self._run_mkldnn_benchdnn_test('./benchdnn --ip --batch=inputs/ip/test_ip_bfloat16')
47
48 def test_mkldnn_reorder_api(self):
49 return self._run_mkldnn_benchdnn_test('./benchdnn --reorder --batch=inputs/reorder/test_reorder_bfloat16')
50
51 def test_mkldnn_rnn_api(self):
52 return self._run_mkldnn_benchdnn_test('./benchdnn --rnn --batch=inputs/rnn/test_rnn_all')
53
54 def test_mkldnn_shuffle_api(self):
55 return self._run_mkldnn_benchdnn_test('./benchdnn --shuffle --batch=inputs/shuffle/test_shuffle_bfloat16') \ No newline at end of file
diff --git a/lib/oeqa/runtime/miutils/tests/squeezenet_model_download_test.py b/lib/oeqa/runtime/miutils/tests/squeezenet_model_download_test.py
new file mode 100644
index 00000000..a3e46a0a
--- /dev/null
+++ b/lib/oeqa/runtime/miutils/tests/squeezenet_model_download_test.py
@@ -0,0 +1,25 @@
1class SqueezenetModelDownloadTest(object):
2 download_files = {'squeezenet1.1.prototxt': 'https://raw.githubusercontent.com/DeepScale/SqueezeNet/a47b6f13d30985279789d08053d37013d67d131b/SqueezeNet_v1.1/deploy.prototxt',
3 'squeezenet1.1.caffemodel': 'https://github.com/DeepScale/SqueezeNet/raw/a47b6f13d30985279789d08053d37013d67d131b/SqueezeNet_v1.1/squeezenet_v1.1.caffemodel'}
4
5 def __init__(self, target, work_dir):
6 self.target = target
7 self.work_dir = work_dir
8
9 def setup(self):
10 self.target.run('mkdir -p %s' % self.work_dir)
11
12 def tear_down(self):
13 self.target.run('rm -rf %s' % self.work_dir)
14
15 def test_can_download_squeezenet_model(self, proxy_port):
16 return self.target.run('cd %s; wget %s -e https_proxy=%s' %
17 (self.work_dir,
18 self.download_files['squeezenet1.1.caffemodel'],
19 proxy_port))
20
21 def test_can_download_squeezenet_prototxt(self, proxy_port):
22 return self.target.run('cd %s; wget %s -e https_proxy=%s' %
23 (self.work_dir,
24 self.download_files['squeezenet1.1.prototxt'],
25 proxy_port))
diff --git a/recipes-bsp/amt/files/atnetworktool-printf-fix.patch b/recipes-bsp/amt/files/atnetworktool-printf-fix.patch
deleted file mode 100644
index 6bb03e3a..00000000
--- a/recipes-bsp/amt/files/atnetworktool-printf-fix.patch
+++ /dev/null
@@ -1,20 +0,0 @@
1Add a missing debug ifdef causing compilation problems.
2
3Upstream-Status: Submitted
4
5Signed-off-by: Tom Zanussi <tom.zanussi (a] intel.com>
6
7Index: lms-7.1.20/src/tools/ATNetworkTool.cpp
8===================================================================
9--- lms-7.1.20.orig/src/tools/ATNetworkTool.cpp 2012-04-30 23:24:56.693879920 -0500
10+++ lms-7.1.20/src/tools/ATNetworkTool.cpp 2012-04-30 23:25:32.363473948 -0500
11@@ -302,7 +302,9 @@
12 close(s);
13 return -1;
14 }
15+#ifdef LMS_NET_DEBUG
16 printf("successfully binded local\n");
17+#endif
18
19 }
20 if (bind(s, addr, addrlen) == -1) {
diff --git a/recipes-bsp/amt/files/readlink-declaration.patch b/recipes-bsp/amt/files/readlink-declaration.patch
deleted file mode 100644
index 0246d501..00000000
--- a/recipes-bsp/amt/files/readlink-declaration.patch
+++ /dev/null
@@ -1,18 +0,0 @@
1Add a missing include causing compilation (missing declaration) problems.
2
3Upstream-Status: Submitted
4
5Signed-off-by: Tom Zanussi <tom.zanussi (a] intel.com>
6
7Index: lms-7.1.20/src/tools/ATVersion.cpp
8===================================================================
9--- lms-7.1.20.orig/src/tools/ATVersion.cpp 2012-05-29 20:34:34.061997035 -0500
10+++ lms-7.1.20/src/tools/ATVersion.cpp 2012-05-29 20:35:22.671412948 -0500
11@@ -40,6 +40,7 @@
12 #include <cerrno>
13 #include <fstream>
14 #include <dirent.h>
15+#include <unistd.h>
16
17 #define AT_VERSION_ARGUMENT "--version"
18 #define AT_VERSION_MAXSIZE 40
diff --git a/recipes-bsp/amt/lms/0001-Include-sys-select.h-for-fd_set.patch b/recipes-bsp/amt/lms/0001-Include-sys-select.h-for-fd_set.patch
deleted file mode 100644
index e28d45ac..00000000
--- a/recipes-bsp/amt/lms/0001-Include-sys-select.h-for-fd_set.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1From 518a3a277c89a3d6b0a9d3ee552cfa33a1dbd5c6 Mon Sep 17 00:00:00 2001
2From: Jussi Kukkonen <jussi.kukkonen@intel.com>
3Date: Mon, 23 Jan 2017 20:45:08 +0200
4Subject: [PATCH 1/2] Include sys/select.h for fd_set()
5
6This is needed at least on musl.
7
8Upstream-Status: Pending
9Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
10---
11 src/mei/MEILinux.cpp | 1 +
12 1 file changed, 1 insertion(+)
13
14diff --git a/src/mei/MEILinux.cpp b/src/mei/MEILinux.cpp
15index 1e9d28f..631270e 100755
16--- a/src/mei/MEILinux.cpp
17+++ b/src/mei/MEILinux.cpp
18@@ -37,6 +37,7 @@
19 #include <cerrno>
20 #include <fcntl.h>
21 #include <sys/ioctl.h>
22+#include <sys/select.h>
23 #include <unistd.h>
24 #include <stdint.h>
25 #include <aio.h>
26--
272.1.4
28
diff --git a/recipes-bsp/amt/lms/0001-Protocol.cpp-Add-whitespace-for-gcc6-compile-error.patch b/recipes-bsp/amt/lms/0001-Protocol.cpp-Add-whitespace-for-gcc6-compile-error.patch
deleted file mode 100644
index 17b206e2..00000000
--- a/recipes-bsp/amt/lms/0001-Protocol.cpp-Add-whitespace-for-gcc6-compile-error.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1From 8d737ba9745bef223c3d3b96899f11c26102ea04 Mon Sep 17 00:00:00 2001
2From: Saul Wold <sgw@linux.intel.com>
3Date: Mon, 16 May 2016 09:01:05 -0700
4Subject: [PATCH] Protocol.cpp: Add whitespace for gcc6 compile error
5
6When moving from C++-3 -> C++11 additiona white space is required between
7User-defined literals.
8
9Upstream-Status: Pending
10
11Signed-off-by: Saul Wold <sgw@linux.intel.com>
12---
13 src/Protocol.cpp | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/src/Protocol.cpp b/src/Protocol.cpp
17index 1c21a0f..3a4a9bb 100755
18--- a/src/Protocol.cpp
19+++ b/src/Protocol.cpp
20@@ -1428,7 +1428,7 @@ int Protocol::_handleFQDNChange(const char *fqdn)
21 char host[FQDN_MAX_SIZE + 1];
22 #define LMS_MAX_LINE_LEN 1023
23 char line[LMS_MAX_LINE_LEN + 1];
24-#define LMS_LINE_SIG_FIRST_WORDS(a) "# LMS GENERATED "a" "
25+#define LMS_LINE_SIG_FIRST_WORDS(a) "# LMS GENERATED " a " "
26 #define LMS_LINE_SIG_LAST_WORD "LINE"
27 #define LMS_LINE_SIG_LAST_WORD_LEN 4
28 #define LMS_LINE_SIG(a) LMS_LINE_SIG_FIRST_WORDS(a) LMS_LINE_SIG_LAST_WORD
29--
302.5.0
31
diff --git a/recipes-bsp/amt/lms/0002-Use-proper-netinet-in.h-API.patch b/recipes-bsp/amt/lms/0002-Use-proper-netinet-in.h-API.patch
deleted file mode 100644
index fa2e29a5..00000000
--- a/recipes-bsp/amt/lms/0002-Use-proper-netinet-in.h-API.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1From 0adc925ca9e005f93d77f373ccda2a6c6cc3ff2f Mon Sep 17 00:00:00 2001
2From: Jussi Kukkonen <jussi.kukkonen@intel.com>
3Date: Mon, 23 Jan 2017 20:46:50 +0200
4Subject: [PATCH 2/2] Use proper netinet/in.h API
5
6in6addr is only guaranteed to contain this member:
7 uint8_t s6_addr[16]
8Use that instead of the glibc implementation detail __in6_u.
9
10Upstream-Status: Pending
11Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
12---
13 src/tools/ATNetworkTool.cpp | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/src/tools/ATNetworkTool.cpp b/src/tools/ATNetworkTool.cpp
17index 66e27df..0789c79 100755
18--- a/src/tools/ATNetworkTool.cpp
19+++ b/src/tools/ATNetworkTool.cpp
20@@ -207,7 +207,7 @@ int ATNetworkTool::GetSockPeerIP(int sock, ATAddressList & peerAddresses, int &e
21 if(sa->sa_family == AF_INET6 && IN6_IS_ADDR_V4MAPPED(&addr)) //if(IN6_IS_ADDR_V4COMPAT(&addr))
22 {
23 struct in_addr demapped_addr;
24- memcpy(&demapped_addr.s_addr, &addr.__in6_u.__u6_addr8[12], 4);
25+ memcpy(&demapped_addr.s_addr, &addr.s6_addr[12], 4);
26
27 struct sockaddr_in sa_in;
28 sa_in.sin_family = AF_INET;
29--
302.1.4
31
diff --git a/recipes-bsp/amt/lms/0003-Fix-device-file-referance-to-dev-mei0-remove-select.patch b/recipes-bsp/amt/lms/0003-Fix-device-file-referance-to-dev-mei0-remove-select.patch
deleted file mode 100644
index 433d3016..00000000
--- a/recipes-bsp/amt/lms/0003-Fix-device-file-referance-to-dev-mei0-remove-select.patch
+++ /dev/null
@@ -1,91 +0,0 @@
1Fix device file referance to /dev/mei0, remove select post write.
2
3LMS uses /dev/mei character device which is absent on current kernel versions causing LMS fail to initialize. LMS sends messages to MEI with a post select timeout. Select timeout causes SendMessage to fail causing LMS to not to communicate properly with MEI.
4
5Adding /dev/mei0 device file reference to check first and then /dev/mei sucessfully initializes LMS. Rely on write return length and remove select with timeout to fix communication with MEI.
6
7Upstream-Status: Pending
8
9Signed-off-by: Anand Vastrad <anand.vastrad@intel.com>
10---
11 src/mei/MEILinux.cpp | 43 +++++++------------------------------------
12 1 file changed, 7 insertions(+), 36 deletions(-)
13
14diff --git a/src/mei/MEILinux.cpp b/src/mei/MEILinux.cpp
15index 1e9d28f..6d23f54 100755
16--- a/src/mei/MEILinux.cpp
17+++ b/src/mei/MEILinux.cpp
18@@ -94,13 +94,17 @@ bool MEILinux::Init(unsigned char reqProtocolVersion)
19 Deinit();
20 }
21
22- _fd = open("/dev/mei", O_RDWR);
23+ _fd = open("/dev/mei0", O_RDWR);
24
25 if (_fd == -1 ) {
26 if (_verbose) {
27- fprintf(stderr, "Error: Cannot establish a handle to the MEI driver\n");
28+ fprintf(stderr, "Warning: Cannot establish a handle to the MEI driver mei0, retrying with mei \n");
29+ }
30+ _fd = open("/dev/mei", O_RDWR);
31+ if (_fd == -1 ) {
32+ fprintf(stderr, "Error: Cannot establish a handle to the MEI driver mei\n");
33+ return false;
34 }
35- return false;
36 }
37 _initialized = true;
38
39@@ -181,13 +185,7 @@ int MEILinux::ReceiveMessage(unsigned char *buffer, int len, unsigned long timeo
40 int MEILinux::SendMessage(const unsigned char *buffer, int len, unsigned long timeout)
41 {
42 int rv = 0;
43- int return_length =0;
44 int error = 0;
45- fd_set set;
46- struct timeval tv;
47-
48- tv.tv_sec = timeout / 1000;
49- tv.tv_usec =(timeout % 1000) * 1000000;
50
51 if (_verbose) {
52 fprintf(stdout, "call write length = %d\n", len);
53@@ -198,35 +196,8 @@ int MEILinux::SendMessage(const unsigned char *buffer, int len, unsigned long ti
54 if (_verbose) {
55 fprintf(stderr,"write failed with status %d %d\n", rv, error);
56 }
57- goto out;
58- }
59-
60- return_length = rv;
61-
62- FD_ZERO(&set);
63- FD_SET(_fd, &set);
64- rv = select(_fd+1 ,&set, NULL, NULL, &tv);
65- if (rv > 0 && FD_ISSET(_fd, &set)) {
66- if (_verbose) {
67- fprintf(stderr, "write success\n");
68- }
69 }
70- else if (rv == 0) {
71- if (_verbose) {
72- fprintf(stderr, "write failed on timeout with status\n");
73- }
74- goto out;
75- }
76- else { //rv<0
77- if (_verbose) {
78- fprintf(stderr, "write failed on select with status %d\n", rv);
79- }
80- goto out;
81- }
82-
83- rv = return_length;
84
85-out:
86 if (rv < 0) {
87 Deinit();
88 }
89--
902.7.4
91
diff --git a/recipes-bsp/amt/lms/0004-Intel-AMT-ME-real-time-notification-infra.patch b/recipes-bsp/amt/lms/0004-Intel-AMT-ME-real-time-notification-infra.patch
deleted file mode 100644
index 04f584ae..00000000
--- a/recipes-bsp/amt/lms/0004-Intel-AMT-ME-real-time-notification-infra.patch
+++ /dev/null
@@ -1,2647 +0,0 @@
1Added Intel AMT ME real time notification infra to LMS.
2
3Notification support now actively captures all the INTEL AMT ME events by plugging in to APF infra.
4These events message are in the WsMan XML format. WsMan XML is parsed to get the AlertID and Message arguments.
5A map is initialized initially by reading AMTAlerts.xml which provides alertid,messageArguements and verbose description.
6From AlertID, verbose description is obtained and then using d-bus infra verbose description is notified to the user.
7
8src/tools/utils.cpp Utils class provides static methods for string manipulation and desktop notification.
9src/tools/miniXmlParser.cpp MiniXmlParser class provide methods for parsing the xmlBuffer, validation and retreving tag/value.
10src/tools/httpParser.cpp HttpParser class provides method to parse http response buffer and populate header,body,headerfields properties.
11src/alertDescription.cpp AlertDescription class parses AMTAlerts.xml like xml to populate map of alertId-Arguments and verbose desctiption.
12src/alertIndication.cpp AlertIndication class provides binding to some xmlTags. It uses MiniXmlParse to parse xmlBuffer and provides access methods to some of the fields.
13src/defaultAlerts.cpp provides default AlertID-Description paris. This is used in absence of AMTAlerts.xml.
14src/notifyDesktop.sh is script which uses d-bus infra to pop up desktop notification. The following script can be modified based on device environment and libraries installed.
15src/LMEConnection.cpp has modified the buffer 4x times because of the size of AMT ME Xml data.
16src/Protocol.cpp [ _UNSHandler(char *data, int dataLength) ] has changes to recieve AMT ME event data, gracefully process the data and close the channel.
17
18src/tools/miniXmlParser.cpp has derived work from http://info.meshcentral.com/downloads/MeshAgentFullSource.rar microstack. Author: Bryan Y Roe <bryan.y.roe@intel.com>/Intel Corporation.
19
20Upstream-Status: Pending
21
22Signed-off-by: AnandVastrad <anand.vastrad@intel.com>
23---
24 Makefile.in | 2 +
25 src/AMTAlerts.xml | 464 ++++++++++++++++++++++++++++++++++++++++++++
26 src/LMEConnection.cpp | 2 +-
27 src/Makefile.am | 3 +
28 src/Makefile.in | 172 ++++++++++++++--
29 src/Makefile.inc | 20 +-
30 src/Protocol.cpp | 191 +++++++++++++++---
31 src/Protocol.h | 8 +-
32 src/alertDescription.cpp | 144 ++++++++++++++
33 src/alertDescription.h | 45 +++++
34 src/alertIndication.cpp | 90 +++++++++
35 src/alertIndication.h | 54 ++++++
36 src/defaultAlerts.h | 43 ++++
37 src/notifyDesktop.sh | 10 +
38 src/tools/httpParser.cpp | 101 ++++++++++
39 src/tools/httpParser.h | 49 +++++
40 src/tools/miniXmlParser.cpp | 375 +++++++++++++++++++++++++++++++++++
41 src/tools/miniXmlParser.h | 51 +++++
42 src/tools/utils.cpp | 185 ++++++++++++++++++
43 src/tools/utils.h | 57 ++++++
44 src/tools/xmlNode.cpp | 45 +++++
45 src/tools/xmlNode.h | 49 +++++
46 22 files changed, 2105 insertions(+), 55 deletions(-)
47 mode change 100755 => 100644 Makefile.in
48 create mode 100755 src/AMTAlerts.xml
49 mode change 100755 => 100644 src/Makefile.in
50 create mode 100644 src/alertDescription.cpp
51 create mode 100644 src/alertDescription.h
52 create mode 100644 src/alertIndication.cpp
53 create mode 100644 src/alertIndication.h
54 create mode 100644 src/defaultAlerts.h
55 create mode 100644 src/notifyDesktop.sh
56 create mode 100644 src/tools/httpParser.cpp
57 create mode 100644 src/tools/httpParser.h
58 create mode 100644 src/tools/miniXmlParser.cpp
59 create mode 100644 src/tools/miniXmlParser.h
60 create mode 100644 src/tools/utils.cpp
61 create mode 100644 src/tools/utils.h
62 create mode 100644 src/tools/xmlNode.cpp
63 create mode 100644 src/tools/xmlNode.h
64
65diff --git a/Makefile.in b/Makefile.in
66old mode 100755
67new mode 100644
68index f90be60..e1a248b
69--- a/Makefile.in
70+++ b/Makefile.in
71@@ -133,6 +133,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
72 PACKAGE_NAME = @PACKAGE_NAME@
73 PACKAGE_STRING = @PACKAGE_STRING@
74 PACKAGE_TARNAME = @PACKAGE_TARNAME@
75+PACKAGE_URL = @PACKAGE_URL@
76 PACKAGE_VERSION = @PACKAGE_VERSION@
77 PATH_SEPARATOR = @PATH_SEPARATOR@
78 RANLIB = @RANLIB@
79@@ -185,6 +186,7 @@ pdfdir = @pdfdir@
80 prefix = @prefix@
81 program_transform_name = @program_transform_name@
82 psdir = @psdir@
83+runstatedir = @runstatedir@
84 sbindir = @sbindir@
85 sharedstatedir = @sharedstatedir@
86 sysconfdir = @sysconfdir@
87diff --git a/src/AMTAlerts.xml b/src/AMTAlerts.xml
88new file mode 100755
89index 0000000..ddb3383
90--- /dev/null
91+++ b/src/AMTAlerts.xml
92@@ -0,0 +1,464 @@
93+<?xml version="1.0" encoding="utf-8" standalone="no"?>
94+<!-- Copyright (c) Intel Corporation, 2010 All Rights Reserved. -->
95+<Alerts>
96+<Alert>
97+<Id>iAMT0001</Id>
98+<Arg></Arg>
99+<Message>System Defense Policy triggered.</Message>
100+</Alert>
101+<Alert>
102+<Id>iAMT0002</Id>
103+<Arg></Arg>
104+<Message>Agent Presence Agent not started.</Message>
105+</Alert>
106+<Alert>
107+<Id>iAMT0003</Id>
108+<Arg></Arg>
109+<Message>Agent Presence Agent stopped.</Message>
110+</Alert>
111+<Alert>
112+<Id>iAMT0004</Id>
113+<Arg></Arg>
114+<Message>Agent Presence: running.</Message>
115+</Alert>
116+<Alert>
117+<Id>iAMT0005</Id>
118+<Arg></Arg>
119+<Message>Agent Presence: expired.</Message>
120+</Alert>
121+<Alert>
122+<Id>iAMT0006</Id>
123+<Arg></Arg>
124+<Message>Agent Presence: suspended.</Message>
125+</Alert>
126+<Alert>
127+<Id>iAMT0007</Id>
128+<Arg></Arg>
129+<Message>Host software attempt to disable AMT Network link detected.</Message>
130+</Alert>
131+<Alert>
132+<Id>iAMT0008</Id>
133+<Arg></Arg>
134+<Message>Host software attempt to disable AMT Network link detected -- Host Network link blocked.</Message>
135+</Alert>
136+<Alert>
137+<Id>iAMT0009</Id>
138+<Arg></Arg>
139+<Message>AMT clock or FLASH wear-out protection disabled.</Message>
140+</Alert>
141+<Alert>
142+<Id>iAMT0010</Id>
143+<Arg></Arg>
144+<Message>Intel(R) AMT Network Interface: Heuristics defense slow threshold trespassed.</Message>
145+</Alert>
146+<Alert>
147+<Id>iAMT0011</Id>
148+<Arg></Arg>
149+<Message>Intel(R) AMT Network Interface: Heuristics defense fast threshold trespassed.</Message>
150+</Alert>
151+<Alert>
152+<Id>iAMT0012</Id>
153+<Arg></Arg>
154+<Message>Intel(R) AMT Network Interface: Heuristics defense factory defined threshold trespassed.</Message>
155+</Alert>
156+<Alert>
157+<Id>iAMT0013</Id>
158+<Arg></Arg>
159+<Message>Intel(R) AMT Network Interface: Heuristics defense Encounter timeout expired.</Message>
160+</Alert>
161+<Alert>
162+<Id>iAMT0014</Id>
163+<Arg></Arg>
164+<Message>General certificate error.</Message>
165+</Alert>
166+<Alert>
167+<Id>iAMT0015</Id>
168+<Arg></Arg>
169+<Message>Certificate expired.</Message>
170+</Alert>
171+<Alert>
172+<Id>iAMT0016</Id>
173+<Arg></Arg>
174+<Message>No trusted root certificate.</Message>
175+</Alert>
176+<Alert>
177+<Id>iAMT0017</Id>
178+<Arg></Arg>
179+<Message>Not configured to work with server certificate.</Message>
180+</Alert>
181+<Alert>
182+<Id>iAMT0018</Id>
183+<Arg></Arg>
184+<Message>Certificate revoked.</Message>
185+</Alert>
186+<Alert>
187+<Id>iAMT0019</Id>
188+<Arg></Arg>
189+<Message>RSA exponent too large.</Message>
190+</Alert>
191+<Alert>
192+<Id>iAMT0020</Id>
193+<Arg></Arg>
194+<Message>RSA modulus too large.</Message>
195+</Alert>
196+<Alert>
197+<Id>iAMT0021</Id>
198+<Arg></Arg>
199+<Message>Unsupported digest.</Message>
200+</Alert>
201+<Alert>
202+<Id>iAMT0022</Id>
203+<Arg></Arg>
204+<Message>Distinguished name too long.</Message>
205+</Alert>
206+<Alert>
207+<Id>iAMT0023</Id>
208+<Arg></Arg>
209+<Message>Key usage missing.</Message>
210+</Alert>
211+<Alert>
212+<Id>iAMT0024</Id>
213+<Arg></Arg>
214+<Message>General SSL handshake error.</Message>
215+</Alert>
216+<Alert>
217+<Id>iAMT0025</Id>
218+<Arg></Arg>
219+<Message>General 802.1x error.</Message>
220+</Alert>
221+<Alert>
222+<Id>iAMT0026</Id>
223+<Arg></Arg>
224+<Message>AMT Diagnostic AlertEAC error - General NAC error.</Message>
225+</Alert>
226+<Alert>
227+<Id>iAMT0027</Id>
228+<Arg></Arg>
229+<Message>AMT Diagnostic AlertEAC error - attempt to get a NAC posture while AMT NAC is disabled.</Message>
230+</Alert>
231+<Alert>
232+<Id>iAMT0028</Id>
233+<Arg></Arg>
234+<Message>AMT Diagnostic AlertEAC error - attempt to get a posture of an unsupported type.</Message>
235+</Alert>
236+<Alert>
237+<Id>iAMT0029</Id>
238+<Arg></Arg>
239+<Message>Audit log storage is 50% full.</Message>
240+</Alert>
241+<Alert>
242+<Id>iAMT0030</Id>
243+<Arg></Arg>
244+<Message>Audit log storage is 75% full.</Message>
245+</Alert>
246+<Alert>
247+<Id>iAMT0031</Id>
248+<Arg></Arg>
249+<Message>Audit log storage is 85% full.</Message>
250+</Alert>
251+<Alert>
252+<Id>iAMT0032</Id>
253+<Arg></Arg>
254+<Message>Audit log storage is 95% full.</Message>
255+</Alert>
256+<Alert>
257+<Id>iAMT0033</Id>
258+<Arg></Arg>
259+<Message>Audit log storage is full.</Message>
260+</Alert>
261+<Alert>
262+<Id>iAMT0034</Id>
263+<Arg></Arg>
264+<Message>Firmware Update Event - Partial.</Message>
265+</Alert>
266+<Alert>
267+<Id>iAMT0035</Id>
268+<Arg></Arg>
269+<Message>Firmware Update Event - Failure.</Message>
270+</Alert>
271+<Alert>
272+<Id>iAMT0036</Id>
273+<Arg></Arg>
274+<Message>Remote connectivity initiated.</Message>
275+</Alert>
276+<Alert>
277+<Id>iAMT0037</Id>
278+<Arg></Arg>
279+<Message>ME Presence event.</Message>
280+</Alert>
281+<Alert>
282+<Id>iAMT0038</Id>
283+<Arg>0</Arg>
284+<Message>AMT is being unprovisioned using BIOS command.</Message>
285+</Alert>
286+<Alert>
287+<Id>iAMT0038</Id>
288+<Arg>1</Arg>
289+<Message>AMT is being unprovisioned using Local MEI command.</Message>
290+</Alert>
291+<Alert>
292+<Id>iAMT0038</Id>
293+<Arg>2</Arg>
294+<Message>AMT is being unprovisioned using Local WS-MAN/SOAP command.</Message>
295+</Alert>
296+<Alert>
297+<Id>iAMT0038</Id>
298+<Arg>3</Arg>
299+<Message>AMT is being unprovisioned using Remote WS-MAN/SOAP command.</Message>
300+</Alert>
301+<Alert>
302+<Id>iAMT0050</Id>
303+<Arg></Arg>
304+<Message>User Notification Alert - General Notification.</Message>
305+</Alert>
306+<Alert>
307+<Id>iAMT0050</Id>
308+<Arg>16</Arg>
309+<Message>User Notification Alert - Circuit Breaker notification (CB Drop TX filter hit.).</Message>
310+</Alert>
311+<Alert>
312+<Id>iAMT0050</Id>
313+<Arg>17</Arg>
314+<Message>User Notification Alert - Circuit Breaker notification (CB Rate Limit TX filter hit.).</Message>
315+</Alert>
316+<Alert>
317+<Id>iAMT0050</Id>
318+<Arg>18</Arg>
319+<Message>User Notification Alert - Circuit Breaker notification (CB Drop RX filter hit.).</Message>
320+</Alert>
321+<Alert>
322+<Id>iAMT0050</Id>
323+<Arg>19</Arg>
324+<Message>User Notification Alert - Circuit Breaker notification (CB Rate Limit RX filter hit.).</Message>
325+</Alert>
326+<Alert>
327+<Id>iAMT0050</Id>
328+<Arg>32</Arg>
329+<Message>User Notification Alert - EAC notification.</Message>
330+</Alert>
331+<Alert>
332+<Id>iAMT0050</Id>
333+<Arg>48</Arg>
334+<Message>User Notification Alert - Remote diagnostics - (Remote Redirection session started - SOL).</Message>
335+</Alert>
336+<Alert>
337+<Id>iAMT0050</Id>
338+<Arg>49</Arg>
339+<Message>User Notification Alert - Remote diagnostics - (Remote Redirection session stopped - SOL).</Message>
340+</Alert>
341+<Alert>
342+<Id>iAMT0050</Id>
343+<Arg>50</Arg>
344+<Message>User Notification Alert - Remote diagnostics. (Remote Redirection session started - IDE-R).</Message>
345+</Alert>
346+<Alert>
347+<Id>iAMT0050</Id>
348+<Arg>51</Arg>
349+<Message>User Notification Alert - Remote diagnostics. (Remote Redirection session stopped - IDE-R).</Message>
350+</Alert>
351+<Alert>
352+<Id>iAMT0050</Id>
353+<Arg>66</Arg>
354+<Message>User Notification Alert - WLAN notification (Host profile mismatch - Management Interface ignored).</Message>
355+</Alert>
356+<Alert>
357+<Id>iAMT0050</Id>
358+<Arg>67</Arg>
359+<Message>User Notification Alert - WLAN notification (Management device overrides host radio).</Message>
360+</Alert>
361+<Alert>
362+<Id>iAMT0050</Id>
363+<Arg>68</Arg>
364+<Message>User Notification Alert - WLAN notification (Host profile security mismatch).</Message>
365+</Alert>
366+<Alert>
367+<Id>iAMT0050</Id>
368+<Arg>69</Arg>
369+<Message>User Notification Alert - WLAN notification (Management device relinquishes control over host Radio).</Message>
370+</Alert>
371+<Alert>
372+<Id>iAMT0051</Id>
373+<Arg></Arg>
374+<Message>User Notification Alert - SecIo event.</Message>
375+</Alert>
376+<Alert>
377+<Id>iAMT0051</Id>
378+<Arg>0</Arg>
379+<Message>User Notification Alert - SecIo event semaphore at host.</Message>
380+</Alert>
381+<Alert>
382+<Id>iAMT0051</Id>
383+<Arg>1</Arg>
384+<Message>User Notification Alert - semaphore at ME.</Message>
385+</Alert>
386+<Alert>
387+<Id>iAMT0051</Id>
388+<Arg>2</Arg>
389+<Message>User Notification Alert - SecIo event - semaphore timeout.</Message>
390+</Alert>
391+<Alert>
392+<Id>iAMT0052</Id>
393+<Arg></Arg>
394+<Message>User Notification Alert - KVM session event.</Message>
395+</Alert>
396+<Alert>
397+<Id>iAMT0052</Id>
398+<Arg>0</Arg>
399+<Message>User Notification Alert - KVM session requested.</Message>
400+</Alert>
401+<Alert>
402+<Id>iAMT0052</Id>
403+<Arg>1</Arg>
404+<Message>User Notification Alert - KVM session started.</Message>
405+</Alert>
406+<Alert>
407+<Id>iAMT0052</Id>
408+<Arg>2</Arg>
409+<Message>User Notification Alert - KVM session stopped.</Message>
410+</Alert>
411+<Alert>
412+<Id>iAMT0053</Id>
413+<Arg></Arg>
414+<Message>User Notification Alert - RCS notification.</Message>
415+</Alert>
416+<Alert>
417+<Id>iAMT0053</Id>
418+<Arg>50</Arg>
419+<Message>User Notification Alert - RCS notification (HW button pressed. Connection initiated automatically).</Message>
420+</Alert>
421+<Alert>
422+<Id>iAMT0053</Id>
423+<Arg>52</Arg>
424+<Message>User Notification Alert - RCS notification (HW button pressed. Connection wasn't initiated automatically).</Message>
425+</Alert>
426+<Alert>
427+<Id>iAMT0053</Id>
428+<Arg>53</Arg>
429+<Message>User Notification Alert - RCS notification (Contracts updated).</Message>
430+</Alert>
431+<Alert>
432+<Id>iAMT0054</Id>
433+<Arg></Arg>
434+<Message>User Notification Alert - WLAN notification. Wireless Profile sync enablement state changed.</Message>
435+</Alert>
436+<Alert>
437+<Id>iAMT0055</Id>
438+<Arg></Arg>
439+<Message>User Notification Alert - Provisioning state change notification.</Message>
440+</Alert>
441+<Alert>
442+<Id>iAMT0055</Id>
443+<Arg>0</Arg>
444+<Message>User Notification Alert - Provisioning state change notification - Pre-configuration.</Message>
445+</Alert>
446+<Alert>
447+<Id>iAMT0055</Id>
448+<Arg>1</Arg>
449+<Message>User Notification Alert - Provisioning state change notification - In configuration.</Message>
450+</Alert>
451+<Alert>
452+<Id>iAMT0055</Id>
453+<Arg>2</Arg>
454+<Message>User Notification Alert - Provisioning state change notification - Post-configuration.</Message>
455+</Alert>
456+<Alert>
457+<Id>iAMT0055</Id>
458+<Arg>3</Arg>
459+<Message>User Notification Alert - Provisioning state change notification - unprovision process has started.</Message>
460+</Alert>
461+<Alert>
462+<Id>iAMT0056</Id>
463+<Arg></Arg>
464+<Message>User Notification Alert - System Defense change notification.</Message>
465+</Alert>
466+<Alert>
467+<Id>iAMT0057</Id>
468+<Arg></Arg>
469+<Message>User Notification Alert - Network State change notification.</Message>
470+</Alert>
471+<Alert>
472+<Id>iAMT0058</Id>
473+<Arg></Arg>
474+<Message>User Notification Alert - Remote Access change notification.</Message>
475+</Alert>
476+<Alert>
477+<Id>iAMT0058</Id>
478+<Arg>1</Arg>
479+<Message>User Notification Alert - Remote Access change notification - tunnel is closed.</Message>
480+</Alert>
481+<Alert>
482+<Id>iAMT0058</Id>
483+<Arg>1</Arg>
484+<Message>User Notification Alert - Remote Access change notification - tunnel is open.</Message>
485+</Alert>
486+<Alert>
487+<Id>iAMT0059</Id>
488+<Arg></Arg>
489+<Message>User Notification Alert - KVM enabled event.</Message>
490+</Alert>
491+<Alert>
492+<Id>iAMT0059</Id>
493+<Arg>0</Arg>
494+<Message>User Notification Alert - KVM enabled event - KVM disabled.</Message>
495+</Alert>
496+<Alert>
497+<Id>iAMT0059</Id>
498+<Arg>1</Arg>
499+<Message>User Notification Alert - KVM enabled event - KVM enabled (both from MEBx and PTNI).</Message>
500+</Alert>
501+<Alert>
502+<Id>iAMT0060</Id>
503+<Arg></Arg>
504+<Message>User Notification Alert - SecIO configuration event.</Message>
505+</Alert>
506+<Alert>
507+<Id>iAMT0061</Id>
508+<Arg></Arg>
509+<Message>ME FW reset occurred.</Message>
510+</Alert>
511+<Alert>
512+<Id>iAMT0062</Id>
513+<Arg></Arg>
514+<Message>User Notification Alert - IpSyncEnabled event.</Message>
515+</Alert>
516+<Alert>
517+<Id>iAMT0062</Id>
518+<Arg>0</Arg>
519+<Message>User Notification Alert - IpSyncEnabled event - IpSync disabled.</Message>
520+</Alert>
521+<Alert>
522+<Id>iAMT0062</Id>
523+<Arg>1</Arg>
524+<Message>User Notification Alert - IpSyncEnabled event - IpSync enabled.</Message>
525+</Alert>
526+<Alert>
527+<Id>iAMT0063</Id>
528+<Arg></Arg>
529+<Message>User Notification Alert - HTTP Proxy sync enabled event.</Message>
530+</Alert>
531+<Alert>
532+<Id>iAMT0063</Id>
533+<Arg>0</Arg>
534+<Message>User Notification Alert - HTTP Proxy sync enabled event - HTTP Proxy Sync disabled.</Message>
535+</Alert>
536+<Alert>
537+<Id>iAMT0063</Id>
538+<Arg>1</Arg>
539+<Message>User Notification Alert - HTTP Proxy sync enabled event - HTTP Proxy Sync enabled.</Message>
540+</Alert>
541+<Alert>
542+<Id>iAMT0064</Id>
543+<Arg></Arg>
544+<Message>User Notification Alert - User Consent event.</Message>
545+</Alert>
546+<Alert>
547+<Id>iAMT0064</Id>
548+<Arg>1</Arg>
549+<Message>User Notification Alert - User Consent event - User Consent granted.</Message>
550+</Alert>
551+<Alert>
552+<Id>iAMT0064</Id>
553+<Arg>2</Arg>
554+<Message>User Notification Alert - User Consent event - User Consent ended.</Message>
555+</Alert>
556+</Alerts>
557diff --git a/src/LMEConnection.cpp b/src/LMEConnection.cpp
558index f3e7a2b..d192626 100755
559--- a/src/LMEConnection.cpp
560+++ b/src/LMEConnection.cpp
561@@ -48,7 +48,7 @@ extern glue plugin;
562
563 const GUID LMEConnection::_guid = {0x6733a4db, 0x0476, 0x4e7b, {0xb3, 0xaf, 0xbc, 0xfc, 0x29, 0xbe, 0xe7, 0xa7}};
564
565-const UINT32 LMEConnection::RX_WINDOW_SIZE = 1024;
566+const UINT32 LMEConnection::RX_WINDOW_SIZE = 4096;
567
568 LMEConnection::LMEConnection(bool verbose) :
569 _reqID(0),
570diff --git a/src/Makefile.am b/src/Makefile.am
571index 42d9f47..364427b 100755
572--- a/src/Makefile.am
573+++ b/src/Makefile.am
574@@ -1,4 +1,7 @@
575 sbin_PROGRAMS=lms
576+dist_bin_SCRIPTS=notifyDesktop.sh
577+xml_dir=$(datadir)/xml
578+xml__DATA=AMTAlerts.xml
579
580 SYNCLIB_SRCDIR=SyncLib/src
581 SYNCLIB_HDRDIR=SyncLib/Include
582diff --git a/src/Makefile.in b/src/Makefile.in
583old mode 100755
584new mode 100644
585index c6fe1ba..7b6cafd
586--- a/src/Makefile.in
587+++ b/src/Makefile.in
588@@ -14,6 +14,8 @@
589
590 @SET_MAKE@
591
592+
593+
594 srcdir = @srcdir@
595 top_srcdir = @top_srcdir@
596 VPATH = @srcdir@
597@@ -37,9 +39,9 @@ POST_UNINSTALL = :
598 build_triplet = @build@
599 host_triplet = @host@
600 sbin_PROGRAMS = lms$(EXEEXT)
601-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
602- $(srcdir)/Makefile.inc $(srcdir)/iatshareddata.h.in \
603- $(srcdir)/plugin.h.in
604+DIST_COMMON = $(dist_bin_SCRIPTS) $(srcdir)/Makefile.am \
605+ $(srcdir)/Makefile.in $(srcdir)/Makefile.inc \
606+ $(srcdir)/iatshareddata.h.in $(srcdir)/plugin.h.in
607 subdir = src
608 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
609 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
610@@ -48,14 +50,17 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
611 mkinstalldirs = $(install_sh) -d
612 CONFIG_HEADER = $(top_builddir)/config.h
613 CONFIG_CLEAN_FILES = plugin.h iatshareddata.h
614-am__installdirs = "$(DESTDIR)$(sbindir)"
615+am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(bindir)" \
616+ "$(DESTDIR)$(xml_dir)"
617 sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
618 PROGRAMS = $(sbin_PROGRAMS)
619 am__objects_1 = main.$(OBJEXT) LMEConnection.$(OBJEXT) \
620 ConfigConnection.$(OBJEXT) Protocol.$(OBJEXT) glue.$(OBJEXT) \
621- ChannelGenerator.$(OBJEXT)
622+ ChannelGenerator.$(OBJEXT) alertIndication.$(OBJEXT) \
623+ alertDescription.$(OBJEXT)
624 am__objects_2 = ATVersion.$(OBJEXT) ATNetworkTool.$(OBJEXT) \
625- daemonize.$(OBJEXT)
626+ daemonize.$(OBJEXT) utils.$(OBJEXT) miniXmlParser.$(OBJEXT) \
627+ xmlNode.$(OBJEXT) httpParser.$(OBJEXT)
628 am__objects_3 = MEILinux.$(OBJEXT) MNGCommand.$(OBJEXT) \
629 FWULCommand.$(OBJEXT) PTHICommand.$(OBJEXT)
630 am__objects_4 = EventLinux.$(OBJEXT) SemaphoreLinux.$(OBJEXT) \
631@@ -68,6 +73,8 @@ am__objects_7 = $(am__objects_6) $(am__objects_6) $(am__objects_6) \
632 am_lms_OBJECTS = $(am__objects_5) $(am__objects_7)
633 lms_OBJECTS = $(am_lms_OBJECTS)
634 lms_LDADD = $(LDADD)
635+dist_binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
636+SCRIPTS = $(dist_bin_SCRIPTS)
637 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
638 depcomp = $(SHELL) $(top_srcdir)/depcomp
639 am__depfiles_maybe = depfiles
640@@ -89,6 +96,14 @@ LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
641 $(AM_LDFLAGS) $(LDFLAGS) -o $@
642 SOURCES = $(lms_SOURCES)
643 DIST_SOURCES = $(lms_SOURCES)
644+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
645+am__vpath_adj = case $$p in \
646+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
647+ *) f=$$p;; \
648+ esac;
649+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
650+xml_DATA_INSTALL = $(INSTALL_DATA)
651+DATA = $(xml__DATA)
652 ETAGS = etags
653 CTAGS = ctags
654 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
655@@ -150,6 +165,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
656 PACKAGE_NAME = @PACKAGE_NAME@
657 PACKAGE_STRING = @PACKAGE_STRING@
658 PACKAGE_TARNAME = @PACKAGE_TARNAME@
659+PACKAGE_URL = @PACKAGE_URL@
660 PACKAGE_VERSION = @PACKAGE_VERSION@
661 PATH_SEPARATOR = @PATH_SEPARATOR@
662 RANLIB = @RANLIB@
663@@ -202,10 +218,14 @@ pdfdir = @pdfdir@
664 prefix = @prefix@
665 program_transform_name = @program_transform_name@
666 psdir = @psdir@
667+runstatedir = @runstatedir@
668 sbindir = @sbindir@
669 sharedstatedir = @sharedstatedir@
670 sysconfdir = @sysconfdir@
671 target_alias = @target_alias@
672+dist_bin_SCRIPTS = notifyDesktop.sh
673+xml_dir = $(datadir)/xml
674+xml__DATA = AMTAlerts.xml
675 SYNCLIB_SRCDIR = SyncLib/src
676 SYNCLIB_HDRDIR = SyncLib/Include
677 MEI_DIR = mei
678@@ -238,11 +258,19 @@ $(MEI_DIR)/PTHICommand.cpp
679
680 TOOLS_HDRS = $(TOOLS_DIR)/ATVersion.h \
681 $(TOOLS_DIR)/ATNetworkTool.h \
682-$(TOOLS_DIR)/daemonize.h
683+$(TOOLS_DIR)/daemonize.h \
684+$(TOOLS_DIR)/utils.h \
685+$(TOOLS_DIR)/miniXmlParser.h \
686+$(TOOLS_DIR)/xmlNode.h \
687+$(TOOLS_DIR)/httpParser.h
688
689 TOOLS_SRCS = $(TOOLS_DIR)/ATVersion.cpp \
690 $(TOOLS_DIR)/ATNetworkTool.cpp \
691-$(TOOLS_DIR)/daemonize.cpp
692+$(TOOLS_DIR)/daemonize.cpp \
693+$(TOOLS_DIR)/utils.cpp \
694+$(TOOLS_DIR)/miniXmlParser.cpp \
695+$(TOOLS_DIR)/xmlNode.cpp \
696+$(TOOLS_DIR)/httpParser.cpp
697
698 MAIN_HDRS = types.h \
699 Channel.h \
700@@ -254,14 +282,18 @@ ConfigConnection.h \
701 Protocol.h \
702 glue.h \
703 version.h \
704-ChannelGenerator.h
705+ChannelGenerator.h \
706+alertIndication.h \
707+alertDescription.h
708
709 MAIN_SRCS = main.cpp \
710 LMEConnection.cpp \
711 ConfigConnection.cpp \
712 Protocol.cpp \
713 glue.cpp \
714-ChannelGenerator.cpp
715+ChannelGenerator.cpp \
716+alertIndication.cpp \
717+alertDescription.cpp
718
719 SRCS = $(MAIN_SRCS) \
720 $(TOOLS_SRCS) \
721@@ -342,6 +374,25 @@ clean-sbinPROGRAMS:
722 lms$(EXEEXT): $(lms_OBJECTS) $(lms_DEPENDENCIES)
723 @rm -f lms$(EXEEXT)
724 $(CXXLINK) $(lms_LDFLAGS) $(lms_OBJECTS) $(lms_LDADD) $(LIBS)
725+install-dist_binSCRIPTS: $(dist_bin_SCRIPTS)
726+ @$(NORMAL_INSTALL)
727+ test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
728+ @list='$(dist_bin_SCRIPTS)'; for p in $$list; do \
729+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
730+ if test -f $$d$$p; then \
731+ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
732+ echo " $(dist_binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
733+ $(dist_binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
734+ else :; fi; \
735+ done
736+
737+uninstall-dist_binSCRIPTS:
738+ @$(NORMAL_UNINSTALL)
739+ @list='$(dist_bin_SCRIPTS)'; for p in $$list; do \
740+ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
741+ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
742+ rm -f "$(DESTDIR)$(bindir)/$$f"; \
743+ done
744
745 mostlyclean-compile:
746 -rm -f *.$(OBJEXT)
747@@ -355,17 +406,23 @@ distclean-compile:
748 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ConfigConnection.Po@am__quote@
749 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EventLinux.Po@am__quote@
750 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FWULCommand.Po@am__quote@
751-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MEILinux.Po@am__quote@
752 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LMEConnection.Po@am__quote@
753+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MEILinux.Po@am__quote@
754 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MNGCommand.Po@am__quote@
755 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PTHICommand.Po@am__quote@
756 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Protocol.Po@am__quote@
757 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RWLock.Po@am__quote@
758 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SemaphoreLinux.Po@am__quote@
759 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ThreadLinux.Po@am__quote@
760+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alertDescription.Po@am__quote@
761+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alertIndication.Po@am__quote@
762 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/daemonize.Po@am__quote@
763 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glue.Po@am__quote@
764+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/httpParser.Po@am__quote@
765 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
766+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miniXmlParser.Po@am__quote@
767+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@
768+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmlNode.Po@am__quote@
769
770 .cpp.o:
771 @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
772@@ -430,6 +487,62 @@ daemonize.obj: $(TOOLS_DIR)/daemonize.cpp
773 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
774 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o daemonize.obj `if test -f '$(TOOLS_DIR)/daemonize.cpp'; then $(CYGPATH_W) '$(TOOLS_DIR)/daemonize.cpp'; else $(CYGPATH_W) '$(srcdir)/$(TOOLS_DIR)/daemonize.cpp'; fi`
775
776+utils.o: $(TOOLS_DIR)/utils.cpp
777+@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT utils.o -MD -MP -MF "$(DEPDIR)/utils.Tpo" -c -o utils.o `test -f '$(TOOLS_DIR)/utils.cpp' || echo '$(srcdir)/'`$(TOOLS_DIR)/utils.cpp; \
778+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/utils.Tpo" "$(DEPDIR)/utils.Po"; else rm -f "$(DEPDIR)/utils.Tpo"; exit 1; fi
779+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(TOOLS_DIR)/utils.cpp' object='utils.o' libtool=no @AMDEPBACKSLASH@
780+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
781+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o utils.o `test -f '$(TOOLS_DIR)/utils.cpp' || echo '$(srcdir)/'`$(TOOLS_DIR)/utils.cpp
782+
783+utils.obj: $(TOOLS_DIR)/utils.cpp
784+@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT utils.obj -MD -MP -MF "$(DEPDIR)/utils.Tpo" -c -o utils.obj `if test -f '$(TOOLS_DIR)/utils.cpp'; then $(CYGPATH_W) '$(TOOLS_DIR)/utils.cpp'; else $(CYGPATH_W) '$(srcdir)/$(TOOLS_DIR)/utils.cpp'; fi`; \
785+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/utils.Tpo" "$(DEPDIR)/utils.Po"; else rm -f "$(DEPDIR)/utils.Tpo"; exit 1; fi
786+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(TOOLS_DIR)/utils.cpp' object='utils.obj' libtool=no @AMDEPBACKSLASH@
787+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
788+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o utils.obj `if test -f '$(TOOLS_DIR)/utils.cpp'; then $(CYGPATH_W) '$(TOOLS_DIR)/utils.cpp'; else $(CYGPATH_W) '$(srcdir)/$(TOOLS_DIR)/utils.cpp'; fi`
789+
790+miniXmlParser.o: $(TOOLS_DIR)/miniXmlParser.cpp
791+@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT miniXmlParser.o -MD -MP -MF "$(DEPDIR)/miniXmlParser.Tpo" -c -o miniXmlParser.o `test -f '$(TOOLS_DIR)/miniXmlParser.cpp' || echo '$(srcdir)/'`$(TOOLS_DIR)/miniXmlParser.cpp; \
792+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/miniXmlParser.Tpo" "$(DEPDIR)/miniXmlParser.Po"; else rm -f "$(DEPDIR)/miniXmlParser.Tpo"; exit 1; fi
793+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(TOOLS_DIR)/miniXmlParser.cpp' object='miniXmlParser.o' libtool=no @AMDEPBACKSLASH@
794+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
795+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o miniXmlParser.o `test -f '$(TOOLS_DIR)/miniXmlParser.cpp' || echo '$(srcdir)/'`$(TOOLS_DIR)/miniXmlParser.cpp
796+
797+miniXmlParser.obj: $(TOOLS_DIR)/miniXmlParser.cpp
798+@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT miniXmlParser.obj -MD -MP -MF "$(DEPDIR)/miniXmlParser.Tpo" -c -o miniXmlParser.obj `if test -f '$(TOOLS_DIR)/miniXmlParser.cpp'; then $(CYGPATH_W) '$(TOOLS_DIR)/miniXmlParser.cpp'; else $(CYGPATH_W) '$(srcdir)/$(TOOLS_DIR)/miniXmlParser.cpp'; fi`; \
799+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/miniXmlParser.Tpo" "$(DEPDIR)/miniXmlParser.Po"; else rm -f "$(DEPDIR)/miniXmlParser.Tpo"; exit 1; fi
800+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(TOOLS_DIR)/miniXmlParser.cpp' object='miniXmlParser.obj' libtool=no @AMDEPBACKSLASH@
801+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
802+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o miniXmlParser.obj `if test -f '$(TOOLS_DIR)/miniXmlParser.cpp'; then $(CYGPATH_W) '$(TOOLS_DIR)/miniXmlParser.cpp'; else $(CYGPATH_W) '$(srcdir)/$(TOOLS_DIR)/miniXmlParser.cpp'; fi`
803+
804+xmlNode.o: $(TOOLS_DIR)/xmlNode.cpp
805+@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT xmlNode.o -MD -MP -MF "$(DEPDIR)/xmlNode.Tpo" -c -o xmlNode.o `test -f '$(TOOLS_DIR)/xmlNode.cpp' || echo '$(srcdir)/'`$(TOOLS_DIR)/xmlNode.cpp; \
806+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/xmlNode.Tpo" "$(DEPDIR)/xmlNode.Po"; else rm -f "$(DEPDIR)/xmlNode.Tpo"; exit 1; fi
807+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(TOOLS_DIR)/xmlNode.cpp' object='xmlNode.o' libtool=no @AMDEPBACKSLASH@
808+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
809+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o xmlNode.o `test -f '$(TOOLS_DIR)/xmlNode.cpp' || echo '$(srcdir)/'`$(TOOLS_DIR)/xmlNode.cpp
810+
811+xmlNode.obj: $(TOOLS_DIR)/xmlNode.cpp
812+@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT xmlNode.obj -MD -MP -MF "$(DEPDIR)/xmlNode.Tpo" -c -o xmlNode.obj `if test -f '$(TOOLS_DIR)/xmlNode.cpp'; then $(CYGPATH_W) '$(TOOLS_DIR)/xmlNode.cpp'; else $(CYGPATH_W) '$(srcdir)/$(TOOLS_DIR)/xmlNode.cpp'; fi`; \
813+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/xmlNode.Tpo" "$(DEPDIR)/xmlNode.Po"; else rm -f "$(DEPDIR)/xmlNode.Tpo"; exit 1; fi
814+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(TOOLS_DIR)/xmlNode.cpp' object='xmlNode.obj' libtool=no @AMDEPBACKSLASH@
815+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
816+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o xmlNode.obj `if test -f '$(TOOLS_DIR)/xmlNode.cpp'; then $(CYGPATH_W) '$(TOOLS_DIR)/xmlNode.cpp'; else $(CYGPATH_W) '$(srcdir)/$(TOOLS_DIR)/xmlNode.cpp'; fi`
817+
818+httpParser.o: $(TOOLS_DIR)/httpParser.cpp
819+@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT httpParser.o -MD -MP -MF "$(DEPDIR)/httpParser.Tpo" -c -o httpParser.o `test -f '$(TOOLS_DIR)/httpParser.cpp' || echo '$(srcdir)/'`$(TOOLS_DIR)/httpParser.cpp; \
820+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/httpParser.Tpo" "$(DEPDIR)/httpParser.Po"; else rm -f "$(DEPDIR)/httpParser.Tpo"; exit 1; fi
821+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(TOOLS_DIR)/httpParser.cpp' object='httpParser.o' libtool=no @AMDEPBACKSLASH@
822+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
823+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o httpParser.o `test -f '$(TOOLS_DIR)/httpParser.cpp' || echo '$(srcdir)/'`$(TOOLS_DIR)/httpParser.cpp
824+
825+httpParser.obj: $(TOOLS_DIR)/httpParser.cpp
826+@am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT httpParser.obj -MD -MP -MF "$(DEPDIR)/httpParser.Tpo" -c -o httpParser.obj `if test -f '$(TOOLS_DIR)/httpParser.cpp'; then $(CYGPATH_W) '$(TOOLS_DIR)/httpParser.cpp'; else $(CYGPATH_W) '$(srcdir)/$(TOOLS_DIR)/httpParser.cpp'; fi`; \
827+@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/httpParser.Tpo" "$(DEPDIR)/httpParser.Po"; else rm -f "$(DEPDIR)/httpParser.Tpo"; exit 1; fi
828+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(TOOLS_DIR)/httpParser.cpp' object='httpParser.obj' libtool=no @AMDEPBACKSLASH@
829+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
830+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o httpParser.obj `if test -f '$(TOOLS_DIR)/httpParser.cpp'; then $(CYGPATH_W) '$(TOOLS_DIR)/httpParser.cpp'; else $(CYGPATH_W) '$(srcdir)/$(TOOLS_DIR)/httpParser.cpp'; fi`
831+
832 MEILinux.o: $(MEI_DIR)/MEILinux.cpp
833 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT MEILinux.o -MD -MP -MF "$(DEPDIR)/MEILinux.Tpo" -c -o MEILinux.o `test -f '$(MEI_DIR)/MEILinux.cpp' || echo '$(srcdir)/'`$(MEI_DIR)/MEILinux.cpp; \
834 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/MEILinux.Tpo" "$(DEPDIR)/MEILinux.Po"; else rm -f "$(DEPDIR)/MEILinux.Tpo"; exit 1; fi
835@@ -551,6 +664,23 @@ clean-libtool:
836 distclean-libtool:
837 -rm -f libtool
838 uninstall-info-am:
839+install-xml_DATA: $(xml__DATA)
840+ @$(NORMAL_INSTALL)
841+ test -z "$(xml_dir)" || $(mkdir_p) "$(DESTDIR)$(xml_dir)"
842+ @list='$(xml__DATA)'; for p in $$list; do \
843+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
844+ f=$(am__strip_dir) \
845+ echo " $(xml_DATA_INSTALL) '$$d$$p' '$(DESTDIR)$(xml_dir)/$$f'"; \
846+ $(xml_DATA_INSTALL) "$$d$$p" "$(DESTDIR)$(xml_dir)/$$f"; \
847+ done
848+
849+uninstall-xml_DATA:
850+ @$(NORMAL_UNINSTALL)
851+ @list='$(xml__DATA)'; for p in $$list; do \
852+ f=$(am__strip_dir) \
853+ echo " rm -f '$(DESTDIR)$(xml_dir)/$$f'"; \
854+ rm -f "$(DESTDIR)$(xml_dir)/$$f"; \
855+ done
856
857 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
858 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
859@@ -629,9 +759,9 @@ distdir: $(DISTFILES)
860 done
861 check-am: all-am
862 check: check-am
863-all-am: Makefile $(PROGRAMS)
864+all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA)
865 installdirs:
866- for dir in "$(DESTDIR)$(sbindir)"; do \
867+ for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(xml_dir)"; do \
868 test -z "$$dir" || $(mkdir_p) "$$dir"; \
869 done
870 install: install-am
871@@ -679,11 +809,11 @@ info: info-am
872
873 info-am:
874
875-install-data-am:
876+install-data-am: install-xml_DATA
877 @$(NORMAL_INSTALL)
878 $(MAKE) $(AM_MAKEFLAGS) install-data-hook
879
880-install-exec-am: install-sbinPROGRAMS
881+install-exec-am: install-dist_binSCRIPTS install-sbinPROGRAMS
882
883 install-info: install-info-am
884
885@@ -709,20 +839,22 @@ ps: ps-am
886
887 ps-am:
888
889-uninstall-am: uninstall-info-am uninstall-sbinPROGRAMS
890+uninstall-am: uninstall-dist_binSCRIPTS uninstall-info-am \
891+ uninstall-sbinPROGRAMS uninstall-xml_DATA
892
893 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
894 clean-libtool clean-sbinPROGRAMS ctags distclean \
895 distclean-compile distclean-generic distclean-libtool \
896 distclean-tags distdir dvi dvi-am html html-am info info-am \
897 install install-am install-data install-data-am \
898- install-data-hook install-exec install-exec-am install-info \
899- install-info-am install-man install-sbinPROGRAMS install-strip \
900+ install-data-hook install-dist_binSCRIPTS install-exec \
901+ install-exec-am install-info install-info-am install-man \
902+ install-sbinPROGRAMS install-strip install-xml_DATA \
903 installcheck installcheck-am installdirs maintainer-clean \
904 maintainer-clean-generic mostlyclean mostlyclean-compile \
905 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
906- tags uninstall uninstall-am uninstall-info-am \
907- uninstall-sbinPROGRAMS
908+ tags uninstall uninstall-am uninstall-dist_binSCRIPTS \
909+ uninstall-info-am uninstall-sbinPROGRAMS uninstall-xml_DATA
910
911
912 install-data-hook:
913diff --git a/src/Makefile.inc b/src/Makefile.inc
914index 079503c..8d7e7ab 100755
915--- a/src/Makefile.inc
916+++ b/src/Makefile.inc
917@@ -26,11 +26,19 @@ $(MEI_DIR)/PTHICommand.cpp
918
919 TOOLS_HDRS=$(TOOLS_DIR)/ATVersion.h \
920 $(TOOLS_DIR)/ATNetworkTool.h \
921-$(TOOLS_DIR)/daemonize.h
922+$(TOOLS_DIR)/daemonize.h \
923+$(TOOLS_DIR)/utils.h \
924+$(TOOLS_DIR)/miniXmlParser.h \
925+$(TOOLS_DIR)/xmlNode.h \
926+$(TOOLS_DIR)/httpParser.h
927
928 TOOLS_SRCS=$(TOOLS_DIR)/ATVersion.cpp \
929 $(TOOLS_DIR)/ATNetworkTool.cpp \
930-$(TOOLS_DIR)/daemonize.cpp
931+$(TOOLS_DIR)/daemonize.cpp \
932+$(TOOLS_DIR)/utils.cpp \
933+$(TOOLS_DIR)/miniXmlParser.cpp \
934+$(TOOLS_DIR)/xmlNode.cpp \
935+$(TOOLS_DIR)/httpParser.cpp
936
937 MAIN_HDRS=types.h \
938 Channel.h \
939@@ -42,14 +50,18 @@ ConfigConnection.h \
940 Protocol.h \
941 glue.h \
942 version.h \
943-ChannelGenerator.h
944+ChannelGenerator.h \
945+alertIndication.h \
946+alertDescription.h
947
948 MAIN_SRCS=main.cpp \
949 LMEConnection.cpp \
950 ConfigConnection.cpp \
951 Protocol.cpp \
952 glue.cpp \
953-ChannelGenerator.cpp
954+ChannelGenerator.cpp \
955+alertIndication.cpp \
956+alertDescription.cpp
957
958 SRCS=$(MAIN_SRCS) \
959 $(TOOLS_SRCS) \
960diff --git a/src/Protocol.cpp b/src/Protocol.cpp
961index 3a4a9bb..c3de5cc 100755
962--- a/src/Protocol.cpp
963+++ b/src/Protocol.cpp
964@@ -28,6 +28,7 @@
965 * POSSIBILITY OF SUCH DAMAGE.
966 *******************************************************************************/
967
968+
969 #ifdef HAVE_CONFIG_H
970 #include "config.h"
971 #endif
972@@ -42,7 +43,8 @@
973 #include <fcntl.h>
974 #include <netdb.h>
975 #include <syslog.h>
976-#include "strings.h"
977+#include <vector>
978+#include <string.h>
979
980 #define _stprintf_s snprintf
981 #define strnicmp strncasecmp
982@@ -53,6 +55,11 @@
983 #include "LMS_if.h"
984 #include "Lock.h"
985 #include "ATNetworkTool.h"
986+#include "utils.h"
987+#include "httpParser.h"
988+#include "miniXmlParser.h"
989+#include "alertIndication.h"
990+#include "alertDescription.h"
991
992
993 const LMEProtocolVersionMessage Protocol::MIN_PROT_VERSION(1, 0);
994@@ -99,9 +106,9 @@ bool Protocol::Init(EventLogCallback cb, void *param)
995 PRINT("Protocol::Init started\n");
996 _eventLog = cb;
997 _eventLogParam = param;
998+ _UNSSenderChannel = INVALID_CHANNEL;
999
1000 DeinitFull();
1001-
1002 {
1003 Lock dl(_deinitLock);
1004 _deinitReq = false;
1005@@ -1170,10 +1177,112 @@ void Protocol::_removeFromMaps(Channel *c)
1006 _channelToSocket.erase(c->GetSenderChannel());
1007 _socketToChannel.erase(s);
1008 }
1009-void Protocol::_UNSConnection()
1010+
1011+std::string Protocol::_PACKET_BODY_LENGTH="Content-Length";
1012+std::string Protocol::_NOTIFICATION_HEADER="Intel Management Engine Notification";
1013+int Protocol::_UNSHandler(char *data, int dataLength)
1014 {
1015- PRINT("UNS event\n");
1016+ PRINT("UNS event data\n");
1017+ char *pBuffer = NULL;
1018+ static char *sBuffer = NULL;
1019+ static int sBufferLength = 0;
1020+ int rc = -1;
1021+ unsigned int packetBodyLength = 0;
1022+ HttpParser httpParser;
1023+ std::string httpBody;
1024+ AlertIndication alertIndication;
1025+
1026+ //printf("Processing notification message %d\n", newNotification);
1027+
1028+ //Init if new notification. Append recieved notification bytes to existing buffer otherwise.
1029+ if (_newNotification == true)
1030+ { if (sBuffer != NULL) {
1031+ delete []sBuffer;
1032+ }
1033+ sBuffer = NULL;
1034+ sBufferLength = 0;
1035+ }
1036+
1037+ if (sBuffer == NULL) {
1038+ sBufferLength = 0;
1039+ sBuffer = new char[(dataLength+1) *sizeof(char)];
1040+ memcpy(sBuffer, data, dataLength);
1041+ } else {
1042+ pBuffer = new char[(sBufferLength + dataLength + 1)*sizeof(char)];
1043+ memcpy(pBuffer, sBuffer, sBufferLength);
1044+ memcpy(pBuffer+sBufferLength, data, dataLength);
1045+ delete []sBuffer;
1046+ sBuffer = pBuffer;
1047+ }
1048+
1049+ sBufferLength += dataLength;
1050+ sBuffer[sBufferLength] = '\0';
1051+
1052+ do {
1053+
1054+ if (httpParser.parse(sBuffer) != 0) {
1055+ break;
1056+ }
1057+
1058+ if (httpParser.getHeaderField(_PACKET_BODY_LENGTH).empty()) {
1059+ break;
1060+ }
1061+
1062+ packetBodyLength = stoi(httpParser.getHeaderField(_PACKET_BODY_LENGTH));
1063+
1064+ if (packetBodyLength == 0) {
1065+ break;
1066+ }
1067+
1068+ httpBody = httpParser.getBody();
1069+ if (httpBody.size() < packetBodyLength) {
1070+ break;
1071+ }
1072+
1073+ if (alertIndication.initFromXml((char*)httpBody.c_str(), httpBody.size())) {
1074+ break;
1075+ }
1076+
1077+ std::string alertIDString(alertIndication.getMessageID().data, alertIndication.getMessageID().dataLength);
1078+ if (alertIDString.empty()) {
1079+ break;
1080+ }
1081+
1082+ /*Check if we have match only with ID, if fails then use MessageArguments and checkagain */
1083+ std::string alertDescription;
1084+ std::string _alertDescription;
1085+ std::string notificationBody;
1086+ std::string messageArguments;
1087+ alertDescription = AlertDescription::getAlertDescription(alertIDString);
1088+ messageArguments = std::string(alertIndication.getMessageArguments().data, alertIndication.getMessageArguments().dataLength);
1089+
1090+ if (alertDescription.empty()) {
1091+ alertIDString += "-" + messageArguments;
1092+ alertDescription = AlertDescription::getAlertDescription(alertIDString);
1093+ } else {
1094+ _alertDescription = messageArguments;
1095+ }
1096+
1097+ notificationBody = std::string(alertIndication.getIndicationTime().data, alertIndication.getIndicationTime().dataLength);
1098+ if (alertDescription.empty()) {
1099+ notificationBody += " " + alertIDString;
1100+ } else {
1101+ if (_alertDescription.empty()) {
1102+ notificationBody += " " + alertDescription;
1103+ } else {
1104+ notificationBody += " : " + _alertDescription + " : " + alertDescription;
1105+ }
1106+ }
1107+
1108+ Utils::notifyDesktop(_NOTIFICATION_HEADER, notificationBody, true);
1109+ rc = 0;
1110+
1111+ } while(0);
1112+
1113+ return rc;
1114+
1115 }
1116+
1117 int Protocol::_sendHostFQDN()
1118 {
1119 char localName[FQDN_MAX_SIZE] = "\0";
1120@@ -1195,12 +1304,15 @@ void Protocol::_apfChannelOpen(LMEChannelOpenRequestMessage *chOpenMsg, int *sta
1121 " Recipient channel %d for address %s, port %d.\n",
1122 chOpenMsg->SenderChannel,
1123 chOpenMsg->Address.c_str(), chOpenMsg->Port);
1124+
1125 if(chOpenMsg->Port==0)
1126 {
1127- _UNSConnection();
1128- _sendHostFQDN();
1129- return;
1130+ _UNSSenderChannel = chOpenMsg->SenderChannel;
1131+ _lme.ChannelOpenReplySuccess(_UNSSenderChannel, _UNSRecipientChannel);
1132+ _newNotification = true;
1133+ return;
1134 }
1135+
1136 SOCKET s = ATNetworkTool::Connect(chOpenMsg->Address.c_str(),
1137 chOpenMsg->Port, error, PF_UNSPEC);
1138 if (s == INVALID_SOCKET) {
1139@@ -1282,33 +1394,41 @@ PortForwardRequest *Protocol::_apfChannelClose(LMEChannelCloseMessage *chClMsg)
1140 Lock l(_channelsLock);
1141 PRINT("_apfChannelClose: RecipientChannel=%d\n",chClMsg->RecipientChannel);
1142
1143-
1144- ChannelToSocketMap::iterator it = _channelToSocket.find(chClMsg->RecipientChannel);
1145- if (it != _channelToSocket .end())
1146- {
1147- SOCKET s = it->second;
1148- Channel *c = _socketToChannel[s];
1149- switch(c->GetStatus()) {
1150- case Channel::OPEN:
1151- c->SetStatus(Channel::CLOSED);
1152-
1153- _lme.ChannelClose(c->GetRecipientChannel(), c->GetSenderChannel());
1154- PRINT("Channel %d was closed by Intel AMT.\n", c->GetSenderChannel());
1155+ do {
1156+ if (chClMsg->RecipientChannel == _UNSRecipientChannel)
1157+ {
1158+ //UNS event channel close.
1159+ //We have not created a channel on LMS side, hence ignore
1160 break;
1161+ }
1162
1163- case Channel::WAITING_CLOSE:
1164- PRINT("Received reply by Intel AMT on closing channel %d.\n", c->GetSenderChannel());
1165- break;
1166+ ChannelToSocketMap::iterator it = _channelToSocket.find(chClMsg->RecipientChannel);
1167+ if (it != _channelToSocket .end())
1168+ {
1169+ SOCKET s = it->second;
1170+ Channel *c = _socketToChannel[s];
1171+ switch(c->GetStatus()) {
1172+ case Channel::OPEN:
1173+ c->SetStatus(Channel::CLOSED);
1174+
1175+ _lme.ChannelClose(c->GetRecipientChannel(), c->GetSenderChannel());
1176+ PRINT("Channel %d was closed by Intel AMT.\n", c->GetSenderChannel());
1177+ break;
1178
1179- case Channel::CLOSED:
1180- case Channel::NOT_OPENED:
1181- break;
1182- }
1183+ case Channel::WAITING_CLOSE:
1184+ PRINT("Received reply by Intel AMT on closing channel %d.\n", c->GetSenderChannel());
1185+ break;
1186
1187- _removeFromMaps(c);
1188- clPFwdReq = _closeMChannel(c);
1189+ case Channel::CLOSED:
1190+ case Channel::NOT_OPENED:
1191+ break;
1192+ }
1193+
1194+ _removeFromMaps(c);
1195+ clPFwdReq = _closeMChannel(c);
1196
1197- }
1198+ }
1199+ } while(0);
1200
1201 _channelGenerator.FreeChannel(chClMsg->RecipientChannel);
1202
1203@@ -1320,6 +1440,18 @@ PortForwardRequest *Protocol::_apfChannelData(LMEChannelDataMessage *chDMsg, int
1204 PortForwardRequest *clPFwdReq = NULL;
1205
1206 do {
1207+ if (chDMsg->RecipientChannel == _UNSRecipientChannel)
1208+
1209+ {
1210+ if (_UNSHandler((char*)chDMsg->Data, chDMsg->DataLength) == 0)
1211+ {
1212+ _lme.ChannelClose(_UNSSenderChannel, _UNSRecipientChannel);
1213+ }
1214+ _newNotification = false;
1215+ //UNS event data handle.
1216+ //We have not created a channel on LMS side, hence break
1217+ break;
1218+ }
1219 Lock l(_channelsLock);
1220
1221 ChannelToSocketMap::iterator it = _channelToSocket.find(chDMsg->RecipientChannel);
1222@@ -1341,6 +1473,7 @@ PortForwardRequest *Protocol::_apfChannelData(LMEChannelDataMessage *chDMsg, int
1223 int senderr = 0;
1224 int count = _send(channel->GetSocket(), (char *)chDMsg->Data,
1225 chDMsg->DataLength, senderr);
1226+
1227 PRINT("Sent %d bytes of %d from Intel AMT to channel %d with socket %d.\n",
1228 count, chDMsg->DataLength, chDMsg->RecipientChannel,
1229 channel->GetSocket());
1230diff --git a/src/Protocol.h b/src/Protocol.h
1231index a4ef419..858cb78 100755
1232--- a/src/Protocol.h
1233+++ b/src/Protocol.h
1234@@ -46,6 +46,7 @@
1235
1236 #define SOCKET int
1237 #define INVALID_SOCKET (SOCKET)(~0)
1238+#define INVALID_CHANNEL -1
1239 #define SOCKET_ERROR (-1)
1240
1241
1242@@ -120,7 +121,7 @@ private:
1243 PortForwardRequest *_apfChannelData(LMEChannelDataMessage *chDMsg, int *status);
1244 void _LmeReceive(void *buffer, unsigned int len, int *status);
1245 void _signalSelect();
1246- void _UNSConnection();
1247+ int _UNSHandler(char *buffer, int len);
1248 bool _acceptConnection(SOCKET s, unsigned int port);
1249 int _rxFromSocket(SOCKET s);
1250 int _handleFQDNChange(const char *fqdn);
1251@@ -192,6 +193,11 @@ private:
1252 typedef std::set<unsigned int> listenPortSet;
1253 listenPortSet _listenFailReported;
1254 ChannelGenerator _channelGenerator;
1255+ static const unsigned int _UNSRecipientChannel = 55555;
1256+ unsigned int _UNSSenderChannel;
1257+ bool _newNotification;
1258+ static std::string _PACKET_BODY_LENGTH;
1259+ static std::string _NOTIFICATION_HEADER;
1260 };
1261
1262 #endif
1263diff --git a/src/alertDescription.cpp b/src/alertDescription.cpp
1264new file mode 100644
1265index 0000000..f05f940
1266--- /dev/null
1267+++ b/src/alertDescription.cpp
1268@@ -0,0 +1,144 @@
1269+/*******************************************************************************
1270+ * Copyright (C) 2017 Intel Corporation. All rights reserved.
1271+ *
1272+ * Redistribution and use in source and binary forms, with or without
1273+ * modification, are permitted provided that the following conditions are met:
1274+ *
1275+ * - Redistributions of source code must retain the above copyright notice,
1276+ * this list of conditions and the following disclaimer.
1277+ *
1278+ * - Redistributions in binary form must reproduce the above copyright notice,
1279+ * this list of conditions and the following disclaimer in the documentation
1280+ * and/or other materials provided with the distribution.
1281+ *
1282+ * - Neither the name of Intel Corporation. nor the names of its
1283+ * contributors may be used to endorse or promote products derived from this
1284+ * software without specific prior written permission.
1285+ *
1286+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
1287+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1288+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1289+ * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS
1290+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
1291+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
1292+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
1293+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
1294+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
1295+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
1296+ * POSSIBILITY OF SUCH DAMAGE.
1297+ *******************************************************************************/
1298+#include "alertDescription.h"
1299+#include "miniXmlParser.h"
1300+#include <sstream>
1301+#include <fstream>
1302+#include "defaultAlerts.h"
1303+#include "types.h"
1304+
1305+bool AlertDescription::classInited = false;
1306+std::string AlertDescription::alertXmlFile = "/usr/local/share/xml/AMTAlerts.xml";
1307+std::string AlertDescription::alertXmlFile1 = "/usr/share/xml/AMTAlerts.xml";
1308+std::map<std::string,std::string> AlertDescription::alertDescriptionMap;
1309+
1310+void AlertDescription::initAlertDescription() {
1311+
1312+ char *value = NULL;
1313+ unsigned int valueLength = 0;
1314+ bool fromFile = false;
1315+ std::string alertIdArg;
1316+ std::stringstream ss;
1317+ std::string xmlData;
1318+ CDataLen id;
1319+ CDataLen arg;
1320+ CDataLen description;
1321+ MiniXmlParser xmlParser;
1322+ std::list<CDataLen>defaultAlertsList;
1323+ std::list<CDataLen>::iterator it;
1324+
1325+ do {
1326+ if (classInited) {
1327+ break;
1328+ }
1329+
1330+ std::ifstream is(alertXmlFile, std::ifstream::in);
1331+ if (is.good()) {
1332+ ss << is.rdbuf();
1333+ xmlData = ss.str();
1334+ fromFile = true;
1335+ } else {
1336+ std::ifstream _is(alertXmlFile1, std::ifstream::in);
1337+ if (_is.good()) {
1338+ ss << _is.rdbuf();
1339+ xmlData = ss.str();
1340+ fromFile = true;
1341+ }
1342+ _is.close();
1343+ }
1344+ is.close();
1345+
1346+ /* Parse alert descriptions from xml file, if file is absent use the default ones */
1347+ if (fromFile) {
1348+ /* From xml file */
1349+ if (xmlParser.parse((char*)xmlData.c_str(), xmlData.size()) == 0) {
1350+ /* Process alert xml of form
1351+ * <Alerts><Alert><Id>iAMT0052</Id><Arg>1</Arg></Alert> <Alert>...</Alert> ...<Alerts>
1352+ */
1353+ if (xmlParser.getXmlTagValue(xmlParser.getRootNode(), "Alerts", 6, NULL, 0, &value, &valueLength) == 0 ) {
1354+ while (xmlParser.getXmlTagValue(NULL, "Alert", 5, NULL, 0, &value, &valueLength) == 0) {
1355+ xmlParser.getXmlTagValue(NULL, "Id", 2, NULL, 0, &value, &valueLength);
1356+ id.data = value;
1357+ id.dataLength = valueLength;
1358+
1359+ xmlParser.getXmlTagValue(NULL, "Arg", 3, NULL, 0, &value, &valueLength);
1360+ arg.data = value;
1361+ arg.dataLength = valueLength;
1362+
1363+ alertIdArg = std::string(id.data, id.dataLength) + "-" + std::string(arg.data, arg.dataLength);
1364+
1365+ xmlParser.getXmlTagValue(NULL, "Message", 7, NULL, 0, &value, &valueLength);
1366+ alertDescriptionMap.insert(std::pair<std::string, std::string>(alertIdArg, std::string(value, valueLength)));
1367+ }
1368+ classInited = true;
1369+ }
1370+ } else {
1371+ PRINT("Failed to parse XML\n");
1372+ }
1373+ } else {
1374+ /* Using default XML alerts descriptions */
1375+ defaultAlertsList = Utils::split(DEFAULT_ALERTS , DEFAULT_ALERTS_LENGTH , ";", 1);
1376+ for (CDataLen alert: defaultAlertsList) {
1377+ std::list<CDataLen> alertIdDescription = Utils::split(alert.data, alert.dataLength, ":", 1);
1378+ if (alertIdDescription.size() >= 2) {
1379+ it = alertIdDescription.begin();
1380+ id.data = it->data;
1381+ id.dataLength = it->dataLength;
1382+ it++;
1383+ description.data = it->data;
1384+ description.dataLength = it->dataLength;
1385+ /* Add to std::map for faster retreival */
1386+ alertDescriptionMap.insert(std::pair<std::string, std::string>(std::string(id.data, id.dataLength),
1387+ std::string(description.data, description.dataLength)));
1388+ }
1389+ }
1390+ classInited = true;
1391+ }
1392+ } while(0);
1393+}
1394+
1395+
1396+std::string AlertDescription::getAlertDescription(std::string alert) {
1397+ CDataLen alertDescription;
1398+ std::map<std::string, std::string>::iterator it;
1399+
1400+ if (classInited == false) {
1401+ initAlertDescription();
1402+ }
1403+
1404+ if (classInited && alertDescriptionMap.empty() == false) {
1405+ it = alertDescriptionMap.find(alert);
1406+ if (it != alertDescriptionMap.end()) {
1407+ return it->second;
1408+ }
1409+ }
1410+
1411+ return "";
1412+};
1413diff --git a/src/alertDescription.h b/src/alertDescription.h
1414new file mode 100644
1415index 0000000..6413f2a
1416--- /dev/null
1417+++ b/src/alertDescription.h
1418@@ -0,0 +1,45 @@
1419+/*******************************************************************************
1420+ * Copyright (C) 2017 Intel Corporation. All rights reserved.
1421+ *
1422+ * Redistribution and use in source and binary forms, with or without
1423+ * modification, are permitted provided that the following conditions are met:
1424+ *
1425+ * - Redistributions of source code must retain the above copyright notice,
1426+ * this list of conditions and the following disclaimer.
1427+ *
1428+ * - Redistributions in binary form must reproduce the above copyright notice,
1429+ * this list of conditions and the following disclaimer in the documentation
1430+ * and/or other materials provided with the distribution.
1431+ *
1432+ * - Neither the name of Intel Corporation. nor the names of its
1433+ * contributors may be used to endorse or promote products derived from this
1434+ * software without specific prior written permission.
1435+ *
1436+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
1437+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1438+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1439+ * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS
1440+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
1441+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
1442+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
1443+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
1444+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
1445+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
1446+ * POSSIBILITY OF SUCH DAMAGE.
1447+ *******************************************************************************/
1448+#ifndef _ALERTDESCRIPTION_H
1449+#define _AlERTDESCRIPTION_H
1450+#include "utils.h"
1451+#include <string>
1452+#include <map>
1453+class AlertDescription {
1454+ protected:
1455+ static bool classInited;
1456+ static std::string alertXmlFile;
1457+ static std::string alertXmlFile1;
1458+ static void initAlertDescription();
1459+ static std::map<std::string, std::string> alertDescriptionMap;
1460+ public:
1461+ static std::string getAlertDescription(std::string alert);
1462+};
1463+#endif
1464diff --git a/src/alertIndication.cpp b/src/alertIndication.cpp
1465new file mode 100644
1466index 0000000..ed14abd
1467--- /dev/null
1468+++ b/src/alertIndication.cpp
1469@@ -0,0 +1,90 @@
1470+/*******************************************************************************
1471+ * Copyright (C) 2017 Intel Corporation. All rights reserved.
1472+ *
1473+ * Redistribution and use in source and binary forms, with or without
1474+ * modification, are permitted provided that the following conditions are met:
1475+ *
1476+ * - Redistributions of source code must retain the above copyright notice,
1477+ * this list of conditions and the following disclaimer.
1478+ *
1479+ * - Redistributions in binary form must reproduce the above copyright notice,
1480+ * this list of conditions and the following disclaimer in the documentation
1481+ * and/or other materials provided with the distribution.
1482+ *
1483+ * - Neither the name of Intel Corporation. nor the names of its
1484+ * contributors may be used to endorse or promote products derived from this
1485+ * software without specific prior written permission.
1486+ *
1487+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
1488+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1489+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1490+ * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS
1491+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
1492+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
1493+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
1494+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
1495+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
1496+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
1497+ * POSSIBILITY OF SUCH DAMAGE.
1498+ *******************************************************************************/
1499+#include "miniXmlParser.h"
1500+#include "alertIndication.h"
1501+#include <string.h>
1502+
1503+const char* AlertIndication::CLASS_URI = "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_AlertIndication";
1504+void AlertIndication::initAlertIndication(char *ns, unsigned int nsLen) {
1505+
1506+ char *value = NULL;
1507+ unsigned int valueLen= 0;
1508+
1509+ if (xmlParser.getXmlTagValue(xmlParser.getRootNode(), "MessageID", strlen("MessageID"), ns, nsLen, &value, &valueLen) == 0) {
1510+ messageID.data = value;
1511+ messageID.dataLength = valueLen;
1512+ }
1513+
1514+ if (xmlParser.getXmlTagValue(xmlParser.getRootNode(), "MessageArguments", strlen("MessageArguments"), ns, nsLen, &value, &valueLen) == 0) {
1515+ messageArguments.data = value;
1516+ messageArguments.dataLength = valueLen;
1517+ }
1518+
1519+ if (xmlParser.getXmlTagValue(xmlParser.getRootNode(), "IndicationTime", strlen("IndicationTime"), ns, nsLen, &value, &valueLen) == 0) {
1520+ if (xmlParser.getXmlTagValue(NULL, "Datetime", strlen("Datetime"), NULL, 0, &value, &valueLen) == 0) {
1521+ indicationTime.data = value;
1522+ indicationTime.dataLength = valueLen;
1523+ }
1524+ }
1525+}
1526+
1527+int AlertIndication::initFromXml(char *buffer, unsigned int bufferLen) {
1528+
1529+ char *nsPrefix = NULL;
1530+ int rc = 0;
1531+ unsigned int nsPrefixLen = 0;
1532+
1533+ do {
1534+ if (buffer == NULL || bufferLen == 0) {
1535+ rc = -1;
1536+ break;
1537+ }
1538+
1539+ if (xmlParser.parse(buffer, bufferLen)) {
1540+ rc = -1;
1541+ break;
1542+ }
1543+
1544+ if (xmlParser.getNSPrefix(xmlParser.getRootNode(), (char*)CLASS_URI, CLASS_URI_LEN, &nsPrefix, &nsPrefixLen)) {
1545+ rc = -1;
1546+ break;
1547+ }
1548+
1549+ initAlertIndication(nsPrefix, nsPrefixLen);
1550+
1551+ } while(0);
1552+
1553+ return rc;
1554+}
1555+
1556+CDataLen AlertIndication::getMessageArguments() { return messageArguments; };
1557+CDataLen AlertIndication::getIndicationTime() { return indicationTime; };
1558+CDataLen AlertIndication::getMessageID() { return messageID; };
1559+
1560diff --git a/src/alertIndication.h b/src/alertIndication.h
1561new file mode 100644
1562index 0000000..cf6dc51
1563--- /dev/null
1564+++ b/src/alertIndication.h
1565@@ -0,0 +1,54 @@
1566+/*******************************************************************************
1567+ * Copyright (C) 2017 Intel Corporation. All rights reserved.
1568+ *
1569+ * Redistribution and use in source and binary forms, with or without
1570+ * modification, are permitted provided that the following conditions are met:
1571+ *
1572+ * - Redistributions of source code must retain the above copyright notice,
1573+ * this list of conditions and the following disclaimer.
1574+ *
1575+ * - Redistributions in binary form must reproduce the above copyright notice,
1576+ * this list of conditions and the following disclaimer in the documentation
1577+ * and/or other materials provided with the distribution.
1578+ *
1579+ * - Neither the name of Intel Corporation. nor the names of its
1580+ * contributors may be used to endorse or promote products derived from this
1581+ * software without specific prior written permission.
1582+ *
1583+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
1584+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1585+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1586+ * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS
1587+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
1588+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
1589+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
1590+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
1591+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
1592+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
1593+ * POSSIBILITY OF SUCH DAMAGE.
1594+ *******************************************************************************/
1595+#ifndef __ALERTINDICATION_H
1596+#define __ALERTINDICATION_H
1597+
1598+#include "utils.h"
1599+#include <map>
1600+
1601+class AlertIndication {
1602+ private:
1603+ MiniXmlParser xmlParser;
1604+ CDataLen messageArguments;
1605+ CDataLen indicationTime;
1606+ CDataLen messageID;
1607+ void initAlertIndication(char *ns, unsigned int nsLen);
1608+
1609+ public:
1610+ static const char* CLASS_URI;
1611+ static const int CLASS_URI_LEN = 69;
1612+ int initFromXml(char *buffer, unsigned int bufferLen);
1613+ CDataLen getMessageArguments();
1614+ CDataLen getMessageID();
1615+ CDataLen getIndicationTime();
1616+
1617+};
1618+
1619+#endif
1620diff --git a/src/defaultAlerts.h b/src/defaultAlerts.h
1621new file mode 100644
1622index 0000000..23283f8
1623--- /dev/null
1624+++ b/src/defaultAlerts.h
1625@@ -0,0 +1,43 @@
1626+#ifndef _DEFAULTALERTS_H
1627+#define _DEFAULTALERTS_H
1628+#define DEFAULT_ALERTS_LENGTH 6257
1629+#define DEFAULT_ALERTS "iAMT0001-:System Defense Policy triggered.;iAMT0002-:Agent Presence Agent not started.;iAMT0003-:Agent Presence Agent stopped.;iAMT0004-:Agent Presence: running.;\
1630+iAMT0005-:Agent Presence: expired.;iAMT0006-:Agent Presence: suspended.;iAMT0007-:Host software attempt to disable AMT Network link detected.;\
1631+iAMT0008-:Host software attempt to disable AMT Network link detected -- Host Network link blocked.;iAMT0009-:AMT clock or FLASH wear-out protection disabled.;\
1632+iAMT0010-:Intel(R) AMT Network Interface: Heuristics defense slow threshold trespassed.;iAMT0011-:Intel(R) AMT Network Interface: Heuristics defense fast threshold trespassed.;\
1633+iAMT0012-:Intel(R) AMT Network Interface: Heuristics defense factory defined threshold trespassed.;iAMT0013-:Intel(R) AMT Network Interface: Heuristics defense Encounter timeout expired.;\
1634+iAMT0014-:General certificate error.;iAMT0015-:Certificate expired.;iAMT0016-:No trusted root certificate.;iAMT0017-:Not configured to work with server certificate.;iAMT0018-:Certificate revoked.;\
1635+iAMT0019-:RSA exponent too large.;iAMT0020-:RSA modulus too large.;iAMT0021-:Unsupported digest.;iAMT0022-:Distinguished name too long.;iAMT0023-:Key usage missing.;\
1636+iAMT0024-:General SSL handshake error.;iAMT0025-:General 802.1x error.;iAMT0026-:AMT Diagnostic AlertEAC error - General NAC error.;\
1637+iAMT0027-:AMT Diagnostic AlertEAC error - attempt to get a NAC posture while AMT NAC is disabled.;iAMT0028-:AMT Diagnostic AlertEAC error - attempt to get a posture of an unsupported type.;\
1638+iAMT0029-:Audit log storage is 50% full.;iAMT0030-:Audit log storage is 75% full.;iAMT0031-:Audit log storage is 85% full.;iAMT0032-:Audit log storage is 95% full.;\
1639+iAMT0033-:Audit log storage is full.;iAMT0034-:Firmware Update Event - Partial.;iAMT0035-:Firmware Update Event - Failure.;iAMT0036-:Remote connectivity initiated.;\
1640+iAMT0037-:ME Presence event.;iAMT0038-0:AMT is being unprovisioned using BIOS command.;iAMT0038-1:AMT is being unprovisioned using Local MEI command.;\
1641+iAMT0038-2:AMT is being unprovisioned using Local WS-MAN/SOAP command.;iAMT0038-3:AMT is being unprovisioned using Remote WS-MAN/SOAP command.;\
1642+iAMT0050-:User Notification Alert - General Notification.;iAMT0050-16:User Notification Alert - Circuit Breaker notification (CB Drop TX filter hit.).;\
1643+iAMT0050-17:User Notification Alert - Circuit Breaker notification (CB Rate Limit TX filter hit.).;iAMT0050-18:User Notification Alert - Circuit Breaker notification (CB Drop RX filter hit.).;\
1644+iAMT0050-19:User Notification Alert - Circuit Breaker notification (CB Rate Limit RX filter hit.).;iAMT0050-32:User Notification Alert - EAC notification.;\
1645+iAMT0050-48:User Notification Alert - Remote diagnostics - (Remote Redirection session started - SOL).;iAMT0050-49:User Notification Alert - Remote diagnostics - (Remote Redirection session stopped - SOL).;\
1646+iAMT0050-50:User Notification Alert - Remote diagnostics. (Remote Redirection session started - IDE-R).;iAMT0050-51:User Notification Alert - Remote diagnostics. (Remote Redirection session stopped - IDE-R).;\
1647+iAMT0050-66:User Notification Alert - WLAN notification (Host profile mismatch - Management Interface ignored).;\
1648+iAMT0050-67:User Notification Alert - WLAN notification (Management device overrides host radio).;iAMT0050-68:User Notification Alert - WLAN notification (Host profile security mismatch).;\
1649+iAMT0050-69:User Notification Alert - WLAN notification (Management device relinquishes control over host Radio).;iAMT0051-:User Notification Alert - SecIo event.;\
1650+iAMT0051-0:User Notification Alert - SecIo event semaphore at host.;iAMT0051-1:User Notification Alert - semaphore at ME.;iAMT0051-2:User Notification Alert - SecIo event - semaphore timeout.;\
1651+iAMT0052-:User Notification Alert - KVM session event.;iAMT0052-0:User Notification Alert - KVM session requested.;iAMT0052-1:User Notification Alert - KVM session started.;\
1652+iAMT0052-2:User Notification Alert - KVM session stopped.;iAMT0053-:User Notification Alert - RCS notification.;\
1653+iAMT0053-50:User Notification Alert - RCS notification (HW button pressed. Connection initiated automatically).;\
1654+iAMT0053-52:User Notification Alert - RCS notification (HW button pressed. Connection wasn't initiated automatically).;iAMT0053-53:User Notification Alert - RCS notification (Contracts updated).;\
1655+iAMT0054-:User Notification Alert - WLAN notification. Wireless Profile sync enablement state changed.;iAMT0055-:User Notification Alert - Provisioning state change notification.;\
1656+iAMT0055-0:User Notification Alert - Provisioning state change notification - Pre-configuration.;iAMT0055-1:User Notification Alert - Provisioning state change notification - In configuration.;\
1657+iAMT0055-2:User Notification Alert - Provisioning state change notification - Post-configuration.;\
1658+iAMT0055-3:User Notification Alert - Provisioning state change notification - unprovision process has started.;iAMT0056-:User Notification Alert - System Defense change notification.;\
1659+iAMT0057-:User Notification Alert - Network State change notification.;iAMT0058-:User Notification Alert - Remote Access change notification.;\
1660+iAMT0058-1:User Notification Alert - Remote Access change notification - tunnel is closed.;iAMT0058-1:User Notification Alert - Remote Access change notification - tunnel is open.;\
1661+iAMT0059-:User Notification Alert - KVM enabled event.;iAMT0059-0:User Notification Alert - KVM enabled event - KVM disabled.;\
1662+iAMT0059-1:User Notification Alert - KVM enabled event - KVM enabled (both from MEBx and PTNI).;iAMT0060-:User Notification Alert - SecIO configuration event.;iAMT0061-:ME FW reset occurred.;\
1663+iAMT0062-:User Notification Alert - IpSyncEnabled event.;iAMT0062-0:User Notification Alert - IpSyncEnabled event - IpSync disabled.;\
1664+iAMT0062-1:User Notification Alert - IpSyncEnabled event - IpSync enabled.;iAMT0063-:User Notification Alert - HTTP Proxy sync enabled event.;\
1665+iAMT0063-0:User Notification Alert - HTTP Proxy sync enabled event - HTTP Proxy Sync disabled.;iAMT0063-1:User Notification Alert - HTTP Proxy sync enabled event - HTTP Proxy Sync enabled.;\
1666+iAMT0064-:User Notification Alert - User Consent event.;iAMT0064-1:User Notification Alert - User Consent event - User Consent granted.;\
1667+iAMT0064-2:User Notification Alert - User Consent event - User Consent ended.;"
1668+#endif
1669diff --git a/src/notifyDesktop.sh b/src/notifyDesktop.sh
1670new file mode 100644
1671index 0000000..06bfd97
1672--- /dev/null
1673+++ b/src/notifyDesktop.sh
1674@@ -0,0 +1,10 @@
1675+#!/bin/sh
1676+# get list of current users
1677+for x in $(who | sort -u -k1,1 | awk '{print $1}'); do
1678+ # send message to anyone on display 0
1679+ dbus_session_file=$(eval echo "~$x")/.dbus/session-bus/$(cat /var/lib/dbus/machine-id)-0
1680+ if [ -e "$dbus_session_file" ]; then
1681+ su -l "$x" -c "source '$dbus_session_file'; export DISPLAY=:0; notify-send -u critical -t 2000 '$1' '$2'"
1682+ fi
1683+done
1684+
1685diff --git a/src/tools/httpParser.cpp b/src/tools/httpParser.cpp
1686new file mode 100644
1687index 0000000..38d2901
1688--- /dev/null
1689+++ b/src/tools/httpParser.cpp
1690@@ -0,0 +1,101 @@
1691+/*******************************************************************************
1692+ * Copyright (C) 2017 Intel Corporation. All rights reserved.
1693+ *
1694+ * Redistribution and use in source and binary forms, with or without
1695+ * modification, are permitted provided that the following conditions are met:
1696+ *
1697+ * - Redistributions of source code must retain the above copyright notice,
1698+ * this list of conditions and the following disclaimer.
1699+ *
1700+ * - Redistributions in binary form must reproduce the above copyright notice,
1701+ * this list of conditions and the following disclaimer in the documentation
1702+ * and/or other materials provided with the distribution.
1703+ *
1704+ * - Neither the name of Intel Corporation. nor the names of its
1705+ * contributors may be used to endorse or promote products derived from this
1706+ * software without specific prior written permission.
1707+ *
1708+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
1709+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1710+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1711+ * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS
1712+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
1713+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
1714+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
1715+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
1716+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
1717+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
1718+ * POSSIBILITY OF SUCH DAMAGE.
1719+ *******************************************************************************/
1720+#include "httpParser.h"
1721+#include "utils.h"
1722+#include "types.h"
1723+
1724+int HttpParser::parse(char *buffer) {
1725+
1726+ std::vector<std::string> headerBody;
1727+ std::vector<std::string> header;
1728+ int rc = 0;
1729+ do {
1730+ if (buffer == NULL) {
1731+ rc = -1;
1732+ break;
1733+ }
1734+
1735+ headerBody = Utils::split(buffer, "\r\n\r\n");
1736+ if (headerBody.size() < 2)
1737+ {
1738+ PRINT("Failed to process httpHeader\n");
1739+ rc = -1;
1740+ break;
1741+ }
1742+
1743+ /* Entries in Header are seperated by \r\n */
1744+ header = Utils::split((char*)headerBody[0].c_str(), "\r\n");
1745+
1746+ /* First line in header is the the header line
1747+ * e.g. POST <path> HTTP/1.1
1748+ * e.g GET <path> HTTP/1.1
1749+ */
1750+ headerLine = header[0];
1751+
1752+ /* After headerline are the Fields
1753+ * e.g Content-Length:2204
1754+ */
1755+ for (unsigned int i=1; i< header.size(); i++) {
1756+ std::vector<std::string> field = Utils::split((char*)header[i].c_str(), ":");
1757+ if (field.size() < 2) {
1758+ rc = -1;
1759+ break;
1760+ }
1761+ headerFields.insert(std::pair<std::string, std::string>(field[0], field[1]));
1762+ }
1763+
1764+ if (rc) break;
1765+
1766+ body = headerBody[1];
1767+ } while(0);
1768+
1769+ return rc;
1770+}
1771+
1772+std::string HttpParser::getHeaderLine() {
1773+ return headerLine;
1774+}
1775+
1776+std::string HttpParser::getHeaderField(std::string field) {
1777+ std::map<std::string,std::string>::iterator it;
1778+ std::string fieldValue = "";
1779+
1780+ it = headerFields.find(field);
1781+ if (it != headerFields.end())
1782+ {
1783+ fieldValue = it->second;
1784+ }
1785+
1786+ return fieldValue;
1787+}
1788+
1789+std::string HttpParser::getBody() {
1790+ return body;
1791+}
1792diff --git a/src/tools/httpParser.h b/src/tools/httpParser.h
1793new file mode 100644
1794index 0000000..a82d82a
1795--- /dev/null
1796+++ b/src/tools/httpParser.h
1797@@ -0,0 +1,49 @@
1798+/*******************************************************************************
1799+ * Copyright (C) 2017 Intel Corporation. All rights reserved.
1800+ *
1801+ * Redistribution and use in source and binary forms, with or without
1802+ * modification, are permitted provided that the following conditions are met:
1803+ *
1804+ * - Redistributions of source code must retain the above copyright notice,
1805+ * this list of conditions and the following disclaimer.
1806+ *
1807+ * - Redistributions in binary form must reproduce the above copyright notice,
1808+ * this list of conditions and the following disclaimer in the documentation
1809+ * and/or other materials provided with the distribution.
1810+ *
1811+ * - Neither the name of Intel Corporation. nor the names of its
1812+ * contributors may be used to endorse or promote products derived from this
1813+ * software without specific prior written permission.
1814+ *
1815+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
1816+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1817+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1818+ * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS
1819+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
1820+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
1821+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
1822+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
1823+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
1824+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
1825+ * POSSIBILITY OF SUCH DAMAGE.
1826+ *******************************************************************************/
1827+#ifndef _HTTPPARSER_H
1828+#define _HTTPPARSER_H
1829+#include <vector>
1830+#include <map>
1831+#include <string>
1832+
1833+class HttpParser {
1834+
1835+ public:
1836+ int parse(char *buffer);
1837+ std::string getHeaderLine();
1838+ std::string getHeaderField(std::string field);
1839+ std::string getBody();
1840+ private:
1841+ std::string headerLine;
1842+ std::map<std::string, std::string> headerFields;
1843+ std::string body;
1844+
1845+};
1846+#endif
1847diff --git a/src/tools/miniXmlParser.cpp b/src/tools/miniXmlParser.cpp
1848new file mode 100644
1849index 0000000..f1f0503
1850--- /dev/null
1851+++ b/src/tools/miniXmlParser.cpp
1852@@ -0,0 +1,375 @@
1853+/*******************************************************************************
1854+ * Copyright (C) 2017 Intel Corporation. All rights reserved.
1855+ *
1856+ * Redistribution and use in source and binary forms, with or without
1857+ * modification, are permitted provided that the following conditions are met:
1858+ *
1859+ * - Redistributions of source code must retain the above copyright notice,
1860+ * this list of conditions and the following disclaimer.
1861+ *
1862+ * - Redistributions in binary form must reproduce the above copyright notice,
1863+ * this list of conditions and the following disclaimer in the documentation
1864+ * and/or other materials provided with the distribution.
1865+ *
1866+ * - Neither the name of Intel Corporation. nor the names of its
1867+ * contributors may be used to endorse or promote products derived from this
1868+ * software without specific prior written permission.
1869+ *
1870+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
1871+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1872+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1873+ * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS
1874+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
1875+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
1876+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
1877+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
1878+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
1879+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
1880+ * POSSIBILITY OF SUCH DAMAGE.
1881+ *******************************************************************************/
1882+#include "miniXmlParser.h"
1883+#include "utils.h"
1884+#include <string.h>
1885+#include <list>
1886+#include <stack>
1887+#include "types.h"
1888+
1889+MiniXmlParser::MiniXmlParser() {
1890+ rootNode = NULL;
1891+}
1892+
1893+MiniXmlParser::~MiniXmlParser() {
1894+ if (rootNode) {
1895+ deleteXmlTree(rootNode);
1896+ rootNode = NULL;
1897+ }
1898+}
1899+
1900+void MiniXmlParser::deleteXmlTree(XMLNode* rootNode) {
1901+ XMLNode* node = rootNode;
1902+ XMLNode* tempNode = NULL;
1903+
1904+ while (node != NULL) {
1905+ tempNode = node->childNode;
1906+ delete node;
1907+ node = tempNode;
1908+ }
1909+}
1910+
1911+int MiniXmlParser::validateXML(XMLNode const* rootNode) {
1912+ int rc = 0;
1913+ XMLNode* current = (XMLNode *)rootNode;
1914+ XMLNode* temp = NULL;
1915+ std::stack<XMLNode*> tagStack;
1916+
1917+ while (current != NULL) {
1918+ if (current->tagName == NULL) {
1919+ PRINT("ValidateXML failed, foung a empty tag\n");
1920+ rc = -1;
1921+ break;
1922+ }
1923+
1924+ if (memcmp(current->tagName, "!", 1) == 0) {
1925+ temp = current;
1926+ current = tagStack.empty()?NULL:tagStack.top();
1927+ if (current != NULL) {
1928+ current->childNode = temp->childNode;
1929+ } else {
1930+ current = temp;
1931+ }
1932+ } else if (current->startTag) {
1933+ current->parentNode = tagStack.empty()?NULL:tagStack.top();
1934+ tagStack.push(current);
1935+ } else {
1936+ if (tagStack.empty() == false) {
1937+ temp = tagStack.top();
1938+ tagStack.pop();
1939+ } else {
1940+ temp = NULL;
1941+ }
1942+ if (temp != NULL) {
1943+ if (temp->tagLength == current->tagLength && memcmp(temp->tagName, current->tagName, current->tagLength) == 0) {
1944+ if (current->childNode != NULL) {
1945+ if (current->childNode->startTag != 0) {
1946+ temp->siblingNode = current->childNode;
1947+ }
1948+ }
1949+ temp->closingTag = current;
1950+ current->startingTag = temp;
1951+ } else {
1952+ PRINT("ValidateXML failed, Illegal tag\n");
1953+ rc = -1;
1954+ break;
1955+ }
1956+ } else {
1957+ PRINT("ValidateXML failed, Illegal closing tag\n");
1958+ rc = -1;
1959+ break;
1960+ }
1961+ }
1962+ current = current->childNode;
1963+ }
1964+
1965+ if (tagStack.empty() == false) {
1966+ PRINT("ValidateXML failed, Incomplete XML\n");
1967+ rc = -1;
1968+ }
1969+
1970+ return rc;
1971+}
1972+
1973+int MiniXmlParser::parse(char* buffer, unsigned int bufferLength) {
1974+ int validXml = -1;
1975+ XMLNode* node = NULL;
1976+
1977+ node = _parse(buffer, bufferLength);
1978+ if (node) {
1979+ validXml = validateXML(node);
1980+ }
1981+ rootNode = node;
1982+ return validXml;
1983+}
1984+
1985+XMLNode* MiniXmlParser::_parse(char const* buffer, unsigned int bufferLength) {
1986+
1987+ char* tagName = NULL;
1988+ char* nsTag = NULL;
1989+ char* CommentEnd = NULL;
1990+
1991+ int tagLength = 0;
1992+ int startTag = 0;
1993+ int emptyTag = 0;
1994+ int nsLength = 0;
1995+ int i = 0;
1996+ int CommentIndex = 0;
1997+
1998+ std::list<CDataLen> xmlFields;
1999+ std::list<CDataLen> temp2;
2000+ std::list<CDataLen> tagValue;
2001+
2002+ XMLNode *rootNode = NULL;;
2003+ XMLNode *current = NULL;
2004+ XMLNode *newNode = NULL;
2005+ std::list<CDataLen>::iterator it;
2006+
2007+ if (buffer == NULL || bufferLength == 0) {
2008+ return NULL;
2009+ }
2010+
2011+ xmlFields = Utils::split(buffer, bufferLength, "<", 1);
2012+ for (CDataLen xmlField: xmlFields) {
2013+ if (xmlField.dataLength != 0 && memcmp(xmlField.data, "?", 1) != 0 && (xmlField.data > CommentEnd)) {
2014+ /*Parse XML comments and ignore it.*/
2015+ if (xmlField.dataLength > 3 && memcmp(xmlField.data, "!--", 3)==0) {
2016+ CommentIndex = 3;
2017+ while (((xmlField.data + CommentIndex) < (buffer + bufferLength)) && memcmp(xmlField.data + CommentIndex, "-->", 3) != 0) {
2018+ CommentIndex++;
2019+ }
2020+ CommentEnd = xmlField.data + CommentIndex;
2021+ continue;
2022+ } else {
2023+ emptyTag = 0;
2024+ /*if the first char is / after < then its ending tag, otherwise starting tag. ("</....") */
2025+ if (memcmp(xmlField.data, "/", 1) == 0) {
2026+ startTag = 0;
2027+ xmlField.data = xmlField.data + 1;
2028+ xmlField.dataLength -= 1;
2029+ temp2 = Utils::split(xmlField.data, xmlField.dataLength, ">", 1);
2030+ } else {
2031+
2032+ startTag = 1;
2033+ temp2 = Utils::split(xmlField.data, xmlField.dataLength, ">", 1);
2034+ if (temp2.front().dataLength > 0 && *(char*)(temp2.front().data-1) == '/') {
2035+ //".../>" are empty tags
2036+ emptyTag = 1;
2037+ }
2038+ }
2039+ }
2040+ /*split on ":" to get namespace:tagName*/
2041+ tagValue = Utils::split(temp2.front().data, temp2.front().dataLength, ":", 1);
2042+ if (tagValue.size() == 1) {
2043+ nsTag = NULL;
2044+ nsLength = 0;
2045+ tagName = tagValue.front().data;
2046+ tagLength = tagValue.front().dataLength;
2047+ } else {
2048+ it = tagValue.begin();
2049+ nsTag = it->data;
2050+ nsLength = it->dataLength;
2051+ it++;
2052+ tagName = it->data;
2053+ tagLength = it->dataLength;
2054+ }
2055+ tagValue.clear();
2056+ temp2.clear();
2057+
2058+ /*Parse for multiple ns:tags and recompute the first tagLength*/
2059+ for(i=0; i<tagLength; i++) {
2060+ if ((tagName[i] == ' ')||(tagName[i] == '/')||(tagName[i] == '>')||(tagName[i] == '\t')||(tagName[i] == '\r')||(tagName[i] == '\n')) {
2061+ if (i != 0) {
2062+ if (tagName[i]=='/') {
2063+ emptyTag = 1;
2064+ }
2065+ tagLength = i;
2066+ break;
2067+ }
2068+ }
2069+ }
2070+
2071+ /*Create XML Node, populate properties and add it to the list*/
2072+ if (tagLength != 0) {
2073+ newNode = new XMLNode();
2074+ newNode->tagName = tagName;
2075+ newNode->tagLength = tagLength;
2076+ newNode->startTag = startTag;
2077+ newNode->nsTag = nsTag;
2078+ newNode->nsLength = nsLength;
2079+
2080+
2081+ if (rootNode == NULL) {
2082+ rootNode = newNode;
2083+ }
2084+ else {
2085+ current->childNode = newNode;
2086+ }
2087+ current = newNode;
2088+
2089+ if (emptyTag) {
2090+ newNode = new XMLNode();
2091+ newNode->tagName = tagName;
2092+ newNode->tagLength = tagLength;
2093+ newNode->nsTag = nsTag;
2094+ newNode->nsLength = nsLength;
2095+
2096+ current->emptyTag = 1;
2097+ current->childNode = newNode;
2098+ current = newNode;
2099+ }
2100+ }
2101+
2102+ }
2103+ }
2104+
2105+ xmlFields.clear();
2106+ return rootNode;
2107+}
2108+
2109+/*
2110+ * Parse the XML Tree from rootNode and retrive value of a given key.
2111+ * If rootNode is passed as NULL, parsing resumes from last key retrieved node.
2112+ * Return 0 on Success , -1 otherwise.
2113+ * Inputs : XMLNode *rootNode, char *tag, unsigned int tagLen, char *ns, unsigned int nsLen
2114+ * Outputs: char** value, unsigned int *valueLen
2115+ */
2116+int MiniXmlParser::getXmlTagValue(XMLNode const* rootNode, char const* tag, unsigned int tagLen, char const* ns, unsigned int nsLen, char** value, unsigned int *valueLen)
2117+{
2118+
2119+ static XMLNode *cur = (XMLNode*) rootNode;
2120+ static XMLNode *pcur = cur;
2121+ char *pValue = NULL;
2122+ bool found = false;
2123+
2124+ if (tag == NULL) {
2125+ return -1;
2126+ }
2127+
2128+ if (rootNode != NULL) {
2129+ cur = (XMLNode *) rootNode;
2130+ pcur = cur;
2131+ }
2132+
2133+ while (cur != NULL) {
2134+ while (pcur != NULL) {
2135+ if (pcur->closingTag && memcmp((pcur->tagName), tag, tagLen) == 0) {
2136+ if (ns) {
2137+ if (memcmp(pcur->nsTag, ns, pcur->nsLength) == 0) {
2138+ found = true;
2139+ }
2140+ } else {
2141+ found = true;
2142+ }
2143+
2144+ if (found) {
2145+ pValue = strstr(pcur->tagName, ">") + 1;
2146+ if (pcur->closingTag->nsLength) {
2147+ *valueLen = pcur->closingTag->nsTag - pValue - 2;
2148+ } else {
2149+ *valueLen = pcur->closingTag->tagName - pValue - 2;
2150+ }
2151+ *value = pValue;
2152+ pcur = pcur->childNode;
2153+ return 0;
2154+ }
2155+ }
2156+ pcur = pcur->childNode;
2157+ }
2158+ cur = cur->siblingNode;
2159+ pcur = cur;
2160+ }
2161+
2162+ return -1;
2163+}
2164+
2165+/* Returns Namespace prefix of given URI namespace
2166+ * Inputs : XMLNode *node, char *uri, unsigned int uriLen
2167+ * Outputs: char **nsPrefix, unsigned int *nsPrefixLen
2168+ */
2169+int MiniXmlParser::getNSPrefix(XMLNode const* node, char const* uri, unsigned int uriLen, char **nsPrefix, unsigned int *nsPrefixLen) {
2170+
2171+ bool foundNS = false;;
2172+ char *tagEnd = NULL;
2173+ int rc = 0;
2174+ CDataLen tempNS;
2175+ CDataLen tempURI;
2176+ std::list<CDataLen> tags;
2177+ std::list<CDataLen> temp;
2178+ std::list<CDataLen> temp2;
2179+ std::list<CDataLen>::iterator it;
2180+
2181+ if (node == NULL || uri == NULL) {
2182+ rc = -1;
2183+ return rc;
2184+ }
2185+
2186+ tagEnd = strstr(node->tagName, ">");
2187+ if (tagEnd && nsPrefix != NULL && nsPrefixLen != NULL) {
2188+ tags = Utils::split(node->tagName, tagEnd - node->tagName, " ", 1);
2189+ for (CDataLen tag: tags) {
2190+ temp = Utils::split(tag.data, tag.dataLength, ":", 1);
2191+ if (temp.size() >= 2) {
2192+ it = temp.begin();
2193+ tempNS.data = it->data;
2194+ tempNS.dataLength = it->dataLength;
2195+ it++;
2196+
2197+ if (memcmp(tempNS.data, "xmlns", 5) == 0) {
2198+ temp2 = Utils::split(it->data, it->dataLength, "=", 1);
2199+ if (temp2.size() >= 2) {
2200+ it = temp2.begin();
2201+ tempNS.data = it->data;
2202+ tempNS.dataLength = it->dataLength;
2203+ it++;
2204+ }
2205+ }
2206+ //Ignore if first character is " or '
2207+ if (it->data[0] == 34 || it->data[0] == 39) {
2208+ it->data = it->data + 1;
2209+ }
2210+
2211+ if (memcmp(it->data, uri, uriLen) == 0) {
2212+ foundNS = true;
2213+ break;
2214+ }
2215+ }
2216+ }
2217+ } else {
2218+ rc = -1;
2219+ }
2220+
2221+ if (rc == 0 && foundNS) {
2222+ *nsPrefix = tempNS.data;
2223+ *nsPrefixLen = tempNS.dataLength;
2224+ }
2225+
2226+ return rc;
2227+}
2228diff --git a/src/tools/miniXmlParser.h b/src/tools/miniXmlParser.h
2229new file mode 100644
2230index 0000000..ae0d234
2231--- /dev/null
2232+++ b/src/tools/miniXmlParser.h
2233@@ -0,0 +1,51 @@
2234+/*******************************************************************************
2235+ * Copyright (C) 2017 Intel Corporation. All rights reserved.
2236+ *
2237+ * Redistribution and use in source and binary forms, with or without
2238+ * modification, are permitted provided that the following conditions are met:
2239+ *
2240+ * - Redistributions of source code must retain the above copyright notice,
2241+ * this list of conditions and the following disclaimer.
2242+ *
2243+ * - Redistributions in binary form must reproduce the above copyright notice,
2244+ * this list of conditions and the following disclaimer in the documentation
2245+ * and/or other materials provided with the distribution.
2246+ *
2247+ * - Neither the name of Intel Corporation. nor the names of its
2248+ * contributors may be used to endorse or promote products derived from this
2249+ * software without specific prior written permission.
2250+ *
2251+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
2252+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2253+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2254+ * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS
2255+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2256+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2257+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2258+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2259+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2260+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2261+ * POSSIBILITY OF SUCH DAMAGE.
2262+ *******************************************************************************/
2263+#ifndef _MINIXMLPARSER_H
2264+#define _MINIXMLPARSER_H
2265+#include <iostream>
2266+#include "xmlNode.h"
2267+
2268+class MiniXmlParser {
2269+ public:
2270+ MiniXmlParser();
2271+ ~MiniXmlParser();
2272+ int parse(char* buffer, unsigned int bufferLength);
2273+ XMLNode* getRootNode() { return rootNode; };
2274+ int getXmlTagValue(XMLNode const* rootNode, char const *tag, unsigned int tagLen, char const* ns, unsigned int nsLen, char** value, unsigned int *valueLen);
2275+ int getNSPrefix(XMLNode const* nonde, char const* uri, unsigned int uriLen, char **nsPrefix, unsigned int *nsPrefixLen);
2276+
2277+ private:
2278+ XMLNode* rootNode;
2279+ XMLNode* _parse(char const* buffer, unsigned int bufferLength);
2280+ /* Validates if the XML is well formed and sets up parent sibling pointers */
2281+ int validateXML(XMLNode const* rootNode);
2282+ void deleteXmlTree(XMLNode *root);
2283+};
2284+#endif
2285diff --git a/src/tools/utils.cpp b/src/tools/utils.cpp
2286new file mode 100644
2287index 0000000..ec20b28
2288--- /dev/null
2289+++ b/src/tools/utils.cpp
2290@@ -0,0 +1,185 @@
2291+/*******************************************************************************
2292+ * Copyright (C) 2017 Intel Corporation. All rights reserved.
2293+ *
2294+ * Redistribution and use in source and binary forms, with or without
2295+ * modification, are permitted provided that the following conditions are met:
2296+ *
2297+ * - Redistributions of source code must retain the above copyright notice,
2298+ * this list of conditions and the following disclaimer.
2299+ *
2300+ * - Redistributions in binary form must reproduce the above copyright notice,
2301+ * this list of conditions and the following disclaimer in the documentation
2302+ * and/or other materials provided with the distribution.
2303+ *
2304+ * - Neither the name of Intel Corporation. nor the names of its
2305+ * contributors may be used to endorse or promote products derived from this
2306+ * software without specific prior written permission.
2307+ *
2308+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
2309+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2310+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2311+ * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS
2312+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2313+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2314+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2315+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2316+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2317+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2318+ * POSSIBILITY OF SUCH DAMAGE.
2319+ *******************************************************************************/
2320+#include <string.h>
2321+#include "utils.h"
2322+#include <syslog.h>
2323+#include <unistd.h>
2324+
2325+std::vector<std::string> Utils::split(char const * str, char const * delim) {
2326+ char* tok = (char*)str;
2327+ char* ptok = tok;
2328+ int delimLength = 0;
2329+ std::vector<std::string> splittedStrings;
2330+
2331+ do {
2332+ if (str == NULL) {
2333+ break;
2334+ }
2335+
2336+ if (delim == NULL) {
2337+ splittedStrings.push_back(std::string(str));
2338+ break;
2339+ }
2340+
2341+ delimLength = strlen(delim);
2342+ tok = strstr(ptok, delim);
2343+ while (tok) {
2344+ if (ptok != tok) {
2345+ splittedStrings.push_back(std::string(ptok, tok-ptok));
2346+ }
2347+ ptok = tok + delimLength;
2348+ tok = strstr(ptok, delim);
2349+ }
2350+
2351+ if (ptok != str+strlen(str)) {
2352+ splittedStrings.push_back(std::string(ptok, strlen(ptok)));
2353+ }
2354+ } while(0);
2355+ return splittedStrings;
2356+}
2357+
2358+
2359+char* Utils::strnstr(char const* haystack, unsigned int haystackLength, char const* needle, unsigned int needleLength) {
2360+
2361+ char* needleInHaystack = NULL;
2362+ unsigned int j;
2363+ do {
2364+ if (haystack == NULL || needle == NULL) {
2365+ break;
2366+ }
2367+
2368+ for (unsigned int i = 0; i < haystackLength; i++) {
2369+ if (haystack[i] == '\0' || ((haystackLength - i) < needleLength)) {
2370+ break;
2371+ }
2372+
2373+ for (j = 0; j < needleLength; j++) {
2374+ if (haystack[i + j] != needle[j]) {
2375+ break;
2376+ }
2377+ }
2378+
2379+ if (j == needleLength) {
2380+ //Found needle in haystack
2381+ needleInHaystack = (char*)&haystack[i];
2382+ break;
2383+ }
2384+ }
2385+ } while(0);
2386+ return needleInHaystack;
2387+}
2388+
2389+std::list<CDataLen> Utils::split(char const* str, unsigned int strLength, char const* delim, unsigned int delimLength) {
2390+ char* tok = (char*)str;
2391+ char* ptok = tok;
2392+ std::list<CDataLen> splittedStrings;
2393+ CDataLen dataLen;
2394+
2395+ do {
2396+ if (str == NULL) {
2397+ break;
2398+ }
2399+
2400+ if (delim == NULL) {
2401+ dataLen.data = (char*)str;
2402+ dataLen.dataLength = strLength;
2403+ splittedStrings.push_back(dataLen);
2404+ break;
2405+ }
2406+
2407+ tok = Utils::strnstr(str, strLength, delim, delimLength);
2408+ while (tok) {
2409+ dataLen.data = ptok;
2410+ dataLen.dataLength = tok-ptok;
2411+ if (ptok!=tok) {
2412+ splittedStrings.push_back(dataLen);
2413+ }
2414+ ptok = tok + delimLength;
2415+ tok = Utils::strnstr(ptok, (str + strLength - ptok), delim, delimLength);
2416+ }
2417+
2418+ if (ptok != (str + strLength)) {
2419+ dataLen.data = ptok;
2420+ dataLen.dataLength = str + strLength - ptok;
2421+ splittedStrings.push_back(dataLen);
2422+ }
2423+ } while (0);
2424+ return splittedStrings;
2425+}
2426+
2427+std::string Utils::DEFAULT_NOTIFY_CMD="export DISPLAY=:0; notify-send -u critical -t 2000 ";
2428+std::string Utils::NOTIFY_DESKTOP_SCRIPT="/usr/local/bin/notifyDesktop.sh";
2429+std::string Utils::NOTIFY_DESKTOP_SCRIPT1="/usr/bin/notifyDesktop.sh";
2430+
2431+void Utils::notifyDesktop(std::string header, std::string body, bool logInSyslog) {
2432+
2433+ std::string notifyCMD;
2434+
2435+ if (! access (NOTIFY_DESKTOP_SCRIPT.c_str(), X_OK)) {
2436+ notifyCMD = NOTIFY_DESKTOP_SCRIPT + " '" + header + "' '" + body + "'";
2437+ } else if (! access (NOTIFY_DESKTOP_SCRIPT1.c_str(), X_OK)) {
2438+ notifyCMD = NOTIFY_DESKTOP_SCRIPT1 + " '" + header + "' '" + body + "'";
2439+ } else {
2440+ notifyCMD = DEFAULT_NOTIFY_CMD + " '" + header + "' '" + body + "'";
2441+ }
2442+
2443+ if (logInSyslog) {
2444+ syslog(LOG_INFO, "%s %s\n", header.c_str(), body.c_str());
2445+ }
2446+
2447+ system(notifyCMD.c_str());
2448+}
2449+
2450+
2451+std::string Utils::format(const char *format , ...) {
2452+ char* buffer = NULL;
2453+ int bufferLength = 512;
2454+ int _bufferLength = 0;
2455+ va_list vl;
2456+ std::string formattedString("");
2457+
2458+ buffer = new char[bufferLength];
2459+ if (buffer) {
2460+ va_start(vl, format);
2461+
2462+ _bufferLength = vsnprintf(buffer, bufferLength, format, vl);
2463+ if (bufferLength <= _bufferLength) {
2464+ delete[] buffer;
2465+ buffer = new char[_bufferLength + 1];
2466+ _bufferLength = vsnprintf(buffer, _bufferLength, format, vl);
2467+ }
2468+
2469+ formattedString = std::string(buffer);
2470+ va_end(vl);
2471+ delete[] buffer;
2472+ }
2473+
2474+ return formattedString;
2475+}
2476diff --git a/src/tools/utils.h b/src/tools/utils.h
2477new file mode 100644
2478index 0000000..a7568fa
2479--- /dev/null
2480+++ b/src/tools/utils.h
2481@@ -0,0 +1,57 @@
2482+/*******************************************************************************
2483+ * Copyright (C) 2017 Intel Corporation. All rights reserved.
2484+ *
2485+ * Redistribution and use in source and binary forms, with or without
2486+ * modification, are permitted provided that the following conditions are met:
2487+ *
2488+ * - Redistributions of source code must retain the above copyright notice,
2489+ * this list of conditions and the following disclaimer.
2490+ *
2491+ * - Redistributions in binary form must reproduce the above copyright notice,
2492+ * this list of conditions and the following disclaimer in the documentation
2493+ * and/or other materials provided with the distribution.
2494+ *
2495+ * - Neither the name of Intel Corporation. nor the names of its
2496+ * contributors may be used to endorse or promote products derived from this
2497+ * software without specific prior written permission.
2498+ *
2499+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
2500+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2501+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2502+ * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS
2503+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2504+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2505+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2506+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2507+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2508+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2509+ * POSSIBILITY OF SUCH DAMAGE.
2510+ *******************************************************************************/
2511+
2512+#ifndef __UTILS_H
2513+#define __UTILS_H
2514+#include <iostream>
2515+#include <vector>
2516+#include <list>
2517+#include <string>
2518+#include <cstdarg>
2519+
2520+class CDataLen {
2521+ public:
2522+ char* data;
2523+ int dataLength;
2524+ CDataLen() { data = NULL; dataLength = 0; };
2525+};
2526+
2527+class Utils {
2528+ public:
2529+ static std::string NOTIFY_DESKTOP_SCRIPT;
2530+ static std::string NOTIFY_DESKTOP_SCRIPT1;
2531+ static std::string DEFAULT_NOTIFY_CMD;
2532+ static std::vector<std::string> split(char const* str, char const * delim);
2533+ static std::list<CDataLen> split(char const* str, unsigned int strLength, char const* delim, unsigned int delimLength);
2534+ static char* strnstr(char const* haystack, unsigned int haystackLength, char const* needle, unsigned int needleLength);
2535+ static void notifyDesktop(std::string header, std::string body, bool logInSyslog);
2536+ static std::string format(const char *format , ...);
2537+};
2538+#endif
2539diff --git a/src/tools/xmlNode.cpp b/src/tools/xmlNode.cpp
2540new file mode 100644
2541index 0000000..827cd3f
2542--- /dev/null
2543+++ b/src/tools/xmlNode.cpp
2544@@ -0,0 +1,45 @@
2545+/*******************************************************************************
2546+ * Copyright (C) 2017 Intel Corporation. All rights reserved.
2547+ *
2548+ * Redistribution and use in source and binary forms, with or without
2549+ * modification, are permitted provided that the following conditions are met:
2550+ *
2551+ * - Redistributions of source code must retain the above copyright notice,
2552+ * this list of conditions and the following disclaimer.
2553+ *
2554+ * - Redistributions in binary form must reproduce the above copyright notice,
2555+ * this list of conditions and the following disclaimer in the documentation
2556+ * and/or other materials provided with the distribution.
2557+ *
2558+ * - Neither the name of Intel Corporation. nor the names of its
2559+ * contributors may be used to endorse or promote products derived from this
2560+ * software without specific prior written permission.
2561+ *
2562+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
2563+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2564+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2565+ * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS
2566+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2567+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2568+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2569+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2570+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2571+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2572+ * POSSIBILITY OF SUCH DAMAGE.
2573+ *******************************************************************************/
2574+#include "xmlNode.h"
2575+#include <iostream>
2576+XMLNode::XMLNode() {
2577+ tagName = NULL;
2578+ nsTag = NULL;
2579+ tagLength = 0;
2580+ nsLength = 0;
2581+ startTag = 0;
2582+ emptyTag = 0;
2583+
2584+ closingTag = NULL;
2585+ startingTag = NULL;
2586+ parentNode = NULL;
2587+ childNode = NULL;
2588+ siblingNode = NULL;
2589+}
2590diff --git a/src/tools/xmlNode.h b/src/tools/xmlNode.h
2591new file mode 100644
2592index 0000000..4a6c91e
2593--- /dev/null
2594+++ b/src/tools/xmlNode.h
2595@@ -0,0 +1,49 @@
2596+/*******************************************************************************
2597+ * Copyright (C) 2017 Intel Corporation. All rights reserved.
2598+ *
2599+ * Redistribution and use in source and binary forms, with or without
2600+ * modification, are permitted provided that the following conditions are met:
2601+ *
2602+ * - Redistributions of source code must retain the above copyright notice,
2603+ * this list of conditions and the following disclaimer.
2604+ *
2605+ * - Redistributions in binary form must reproduce the above copyright notice,
2606+ * this list of conditions and the following disclaimer in the documentation
2607+ * and/or other materials provided with the distribution.
2608+ *
2609+ * - Neither the name of Intel Corporation. nor the names of its
2610+ * contributors may be used to endorse or promote products derived from this
2611+ * software without specific prior written permission.
2612+ *
2613+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
2614+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2615+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2616+ * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS
2617+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2618+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2619+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2620+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2621+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2622+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2623+ * POSSIBILITY OF SUCH DAMAGE.
2624+ *******************************************************************************/
2625+#ifndef __XMLNODE_H
2626+#define __XMLNODE_H
2627+class XMLNode {
2628+
2629+ public:
2630+ char* tagName;
2631+ char* nsTag;
2632+ int tagLength;
2633+ int nsLength;
2634+ int startTag;
2635+ int emptyTag;
2636+
2637+ XMLNode* closingTag;
2638+ XMLNode* startingTag;
2639+ XMLNode* parentNode;
2640+ XMLNode* childNode;
2641+ XMLNode* siblingNode;
2642+ XMLNode();
2643+};
2644+#endif
2645--
26462.9.3
2647
diff --git a/recipes-bsp/amt/lms7_7.1.20.bb b/recipes-bsp/amt/lms7_7.1.20.bb
deleted file mode 100644
index eca36811..00000000
--- a/recipes-bsp/amt/lms7_7.1.20.bb
+++ /dev/null
@@ -1,58 +0,0 @@
1DESCRIPTION = "Intel Local Manageability Service allows applications \
2to access the Intel Active Management Technology (AMT) firmware via \
3the Intel Management Engine Interface (MEI)."
4HOMEPAGE = "http://software.intel.com/en-us/articles/download-the-latest-intel-amt-open-source-drivers"
5
6LICENSE = "BSD_LMS"
7
8PR = "r0"
9BPN="lms"
10PV_SUB = "25"
11SRC_URI = "http://software.intel.com/sites/default/files/m/4/e/a/9/b/37962-${BPN}_${PV}.${PV_SUB}.zip \
12 file://atnetworktool-printf-fix.patch \
13 file://readlink-declaration.patch \
14 file://0001-Protocol.cpp-Add-whitespace-for-gcc6-compile-error.patch \
15 file://0001-Include-sys-select.h-for-fd_set.patch \
16 file://0002-Use-proper-netinet-in.h-API.patch \
17 "
18
19LOCALSRC = "file://${WORKDIR}/outputdir/${BPN}-${PV}-${PV_SUB}.tar.gz"
20
21COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
22
23LIC_FILES_CHKSUM = "file://COPYING;md5=7264184cf88d9f27b719a9656255b47b"
24
25SRC_URI[md5sum] = "687b76e78bfdbcf567c0e842c1fe240a"
26SRC_URI[sha256sum] = "cc0457f0044e924794bb1aeae9a72c28666a525cd8a963d0d92970222946e75b"
27
28inherit autotools update-rc.d
29
30INITSCRIPT_NAME = "lms7"
31INITSCRIPT_PARAMS = "defaults"
32
33python do_unpack() {
34 s = d.getVar('S', True)
35 d.setVar('S', '${WORKDIR}/outputdir')
36 bb.build.exec_func('base_do_unpack', d)
37 # temorarily change SRC_URI for unpack
38 src_uri = d.getVar('SRC_URI', True)
39 d.setVar('SRC_URI', '${LOCALSRC}')
40 d.setVar('S', s)
41 bb.build.exec_func('base_do_unpack', d)
42 d.setVar('SRC_URI', src_uri)
43}
44
45
46do_install_append () {
47 mv ${D}/${sbindir}/lms ${D}/${sbindir}/lms7
48 install -d ${D}${sysconfdir}/init.d
49 # The configure script looks at the host to decide where to put init
50 # scripts, so move it at the same time as renaming it.
51 if test -f ${D}${sysconfdir}/rc.d/init.d/lms ; then
52 mv ${D}${sysconfdir}/rc.d/init.d/lms ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
53 else
54 mv ${D}${sysconfdir}/init.d/lms ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
55 fi
56 sed -i 's/^NAME=lms/NAME=lms7/' ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
57 rmdir ${D}${datadir} || :
58}
diff --git a/recipes-bsp/amt/lms8_8.0.0-7.bb b/recipes-bsp/amt/lms8_8.0.0-7.bb
deleted file mode 100644
index 9b37b9b4..00000000
--- a/recipes-bsp/amt/lms8_8.0.0-7.bb
+++ /dev/null
@@ -1,46 +0,0 @@
1DESCRIPTION = "Intel Local Manageability Service allows applications \
2to access the Intel Active Management Technology (AMT) firmware via \
3the Intel Management Engine Interface (MEI)."
4HOMEPAGE = "http://software.intel.com/en-us/articles/download-the-latest-intel-amt-open-source-drivers"
5
6LICENSE = "BSD_LMS"
7
8PR = "r0"
9BPN="lms"
10SRC_URI = "http://software.intel.com/sites/default/files/${BPN}-${PV}.tar.gz \
11 file://readlink-declaration.patch \
12 file://0001-Protocol.cpp-Add-whitespace-for-gcc6-compile-error.patch \
13 file://0001-Include-sys-select.h-for-fd_set.patch \
14 file://0002-Use-proper-netinet-in.h-API.patch \
15 file://0003-Fix-device-file-referance-to-dev-mei0-remove-select.patch \
16 file://0004-Intel-AMT-ME-real-time-notification-infra.patch \
17 "
18
19FILES_${PN} += "${datadir}/xml/AMTAlerts.xml"
20
21COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
22
23LIC_FILES_CHKSUM = "file://COPYING;md5=ec77c894e8a1a89fa07aed2c76680ab8"
24
25SRC_URI[md5sum] = "3cbd027a0e6e9ced8238478b24cde3c6"
26SRC_URI[sha256sum] = "7077db6f2f381e67cb37565b20c40ff0c7d3f98f014e65622a4b4b66c2b1d637"
27
28inherit autotools update-rc.d
29
30INITSCRIPT_NAME = "lms8"
31INITSCRIPT_PARAMS = "defaults"
32
33
34do_install_append () {
35 mv ${D}/${sbindir}/lms ${D}/${sbindir}/lms8
36 install -d ${D}${sysconfdir}/init.d
37 # The configure script looks at the host to decide where to put init
38 # scripts, so move it at the same time as renaming it.
39 if test -f ${D}${sysconfdir}/rc.d/init.d/lms ; then
40 mv ${D}${sysconfdir}/rc.d/init.d/lms ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
41 else
42 mv ${D}${sysconfdir}/init.d/lms ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
43 fi
44 sed -i 's/^NAME=lms/NAME=lms8/' ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
45 rmdir ${D}${datadir} || :
46}
diff --git a/recipes-bsp/formfactor/formfactor_0.0.bbappend b/recipes-bsp/formfactor/formfactor_0.0.bbappend
index 6dd422ae..d21c3bee 100644
--- a/recipes-bsp/formfactor/formfactor_0.0.bbappend
+++ b/recipes-bsp/formfactor/formfactor_0.0.bbappend
@@ -1 +1 @@
FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" FILESEXTRAPATHS:prepend:intel-x86-common := "${THISDIR}/${PN}:"
diff --git a/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf b/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf
deleted file mode 100644
index 74d33c87..00000000
--- a/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf
+++ /dev/null
@@ -1,2 +0,0 @@
1# Mimic modprobe's install funcitonality with busybox's modprobe
2install gma500_gfx dmesg | grep gma500_gfx_checked || { /etc/modprobe.d/gma500-gfx-check.sh || modprobe gma500_gfx; }
diff --git a/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh b/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh
deleted file mode 100644
index 75cda99f..00000000
--- a/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh
+++ /dev/null
@@ -1,15 +0,0 @@
1#!/bin/sh
2
3# Check for devices we wish to avoid gma500_gfx for
4DEVICES="0x8119 0x4108"
5
6# Checked flag to avoid infinite modprobe
7echo "gma500_gfx_checked" >> /dev/kmsg;
8
9for DEVICE in $DEVICES; do
10 if udevadm trigger --subsystem-match=pci --verbose --attr-match=device=$DEVICE | grep "pci" >> /dev/null ; then
11 echo "Found $DEVICE, avoiding gma500_gfx module" >> /dev/kmsg;
12 exit 0
13 fi
14done
15exit 1
diff --git a/recipes-bsp/gma500-gfx-check/gma500-gfx-check_1.0.bb b/recipes-bsp/gma500-gfx-check/gma500-gfx-check_1.0.bb
deleted file mode 100644
index 7b08064b..00000000
--- a/recipes-bsp/gma500-gfx-check/gma500-gfx-check_1.0.bb
+++ /dev/null
@@ -1,18 +0,0 @@
1SUMMARY = "Intel gma500_gfx fix for certain hardware"
2DESCRIPTION = "Avoid inserting gma500_gfx module for certain hardware devices."
3LICENSE="GPLv2"
4LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
5
6SRC_URI = "file://gma500-gfx-check.conf \
7 file://gma500-gfx-check.sh "
8
9do_install(){
10 install -d ${D}${sysconfdir}/modprobe.d/
11 install -m 755 ${WORKDIR}/gma500-gfx-check.sh ${D}${sysconfdir}/modprobe.d/gma500-gfx-check.sh
12 install -m 644 ${WORKDIR}/gma500-gfx-check.conf ${D}${sysconfdir}/modprobe.d/gma500-gfx-check.conf
13}
14
15FILES_${PN}="${sysconfdir}/modprobe.d/gma500-gfx-check.conf \
16 ${sysconfdir}/modprobe.d/gma500-gfx-check.sh"
17
18COMPATIBLE_MACHINE = "intel-core2-32"
diff --git a/recipes-bsp/intel-cmt-cat/intel-cmt-cat_23.11.1.bb b/recipes-bsp/intel-cmt-cat/intel-cmt-cat_23.11.1.bb
new file mode 100644
index 00000000..60d0dfd2
--- /dev/null
+++ b/recipes-bsp/intel-cmt-cat/intel-cmt-cat_23.11.1.bb
@@ -0,0 +1,29 @@
1SUMMARY = "intel-cmt-cat"
2DESCRIPTION = "Software package which provides basic support for Intel(R) \
3Resource Director Technology (Intel(R) RDT)"
4HOMEPAGE = "https://github.com/intel/intel-cmt-cat"
5
6LICENSE = "BSD-3-Clause"
7LIC_FILES_CHKSUM = "file://LICENSE;md5=4b63c65942e1c16fd897f8cd20abebf8"
8
9SRC_URI = "git://github.com/intel/intel-cmt-cat;protocol=https;branch=master"
10SRCREV = "b26b31b0ae6980c5939a421cefe0316cae884626"
11
12S = "${WORKDIR}/git"
13
14COMPATIBLE_HOST = '(x86_64).*-linux'
15COMPATIBLE_HOST:libc-musl = "null"
16
17do_install() {
18 oe_runmake install PREFIX=${D}${prefix} NOLDCONFIG=y
19}
20
21FILES:${PN} += "${nonarch_libdir}/libpqos*"
22FILES:${PN}-doc = "/usr/man*"
23
24INSANE_SKIP:${PN} += "ldflags"
25INSANE_SKIP:${PN} += "dev-so"
26INSANE_SKIP:${PN} += "libdir"
27INSANE_SKIP:${PN} += "already-stripped"
28
29INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
diff --git a/recipes-bsp/metee/metee_3.2.4.bb b/recipes-bsp/metee/metee_3.2.4.bb
new file mode 100644
index 00000000..da8220b9
--- /dev/null
+++ b/recipes-bsp/metee/metee_3.2.4.bb
@@ -0,0 +1,18 @@
1SUMMARY = "Intel(R) METEE Library"
2DESCRIPTION = "MEETEE library provides a cross-platform simple \
3 programing interface for accessing Intel HECI interfaces on devices \
4 found in BigCore and Atom based products."
5
6LICENSE = "Apache-2.0"
7LIC_FILES_CHKSUM = "file://COPYING;md5=2ee41112a44fe7014dce33e26468ba93"
8
9COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
10
11inherit cmake
12
13SRC_URI = "git://github.com/intel/metee.git;branch=master;protocol=https \
14"
15SRCREV = "db45e37e146fd9c06907a15ade55eba06ad1f951"
16
17S = "${WORKDIR}/git"
18
diff --git a/recipes-bsp/rmc/boards/MinnowboardTurbot/KBOOTPARAM b/recipes-bsp/rmc/boards/MinnowboardTurbot/KBOOTPARAM
deleted file mode 100644
index 476b1fbe..00000000
--- a/recipes-bsp/rmc/boards/MinnowboardTurbot/KBOOTPARAM
+++ /dev/null
@@ -1 +0,0 @@
1console=ttyS0,115200
diff --git a/recipes-bsp/rmc/boards/MinnowboardTurbot/minnowboardturbot.fp b/recipes-bsp/rmc/boards/MinnowboardTurbot/minnowboardturbot.fp
deleted file mode 100644
index 9aa145f3..00000000
--- a/recipes-bsp/rmc/boards/MinnowboardTurbot/minnowboardturbot.fp
+++ /dev/null
Binary files differ
diff --git a/recipes-bsp/rmc/boards/NUC5i5RYB/BOOTENTRY.CONFIG b/recipes-bsp/rmc/boards/NUC5i5RYB/BOOTENTRY.CONFIG
deleted file mode 100644
index b2fabe82..00000000
--- a/recipes-bsp/rmc/boards/NUC5i5RYB/BOOTENTRY.CONFIG
+++ /dev/null
@@ -1,2 +0,0 @@
1boot.conf
2install.conf
diff --git a/recipes-bsp/rmc/boards/NUC5i5RYB/INSTALLER.CONFIG b/recipes-bsp/rmc/boards/NUC5i5RYB/INSTALLER.CONFIG
deleted file mode 100644
index ca5f04b9..00000000
--- a/recipes-bsp/rmc/boards/NUC5i5RYB/INSTALLER.CONFIG
+++ /dev/null
@@ -1,2 +0,0 @@
1efi_entry_dir:root:disk:770:/boot/loader/entries/
2boot.conf:root:disk:770:/boot/loader/entries/rmcboot.conf
diff --git a/recipes-bsp/rmc/boards/NUC5i5RYB/POSTINSTALL.sh b/recipes-bsp/rmc/boards/NUC5i5RYB/POSTINSTALL.sh
deleted file mode 100644
index 6694261b..00000000
--- a/recipes-bsp/rmc/boards/NUC5i5RYB/POSTINSTALL.sh
+++ /dev/null
@@ -1,2 +0,0 @@
1# There is no tty device on this board.
2sed -i '/start_getty.\+ttyS.*/d' /tgt_root/etc/inittab
diff --git a/recipes-bsp/rmc/boards/NUC5i5RYB/boot.conf b/recipes-bsp/rmc/boards/NUC5i5RYB/boot.conf
deleted file mode 100644
index b29fa45e..00000000
--- a/recipes-bsp/rmc/boards/NUC5i5RYB/boot.conf
+++ /dev/null
@@ -1,4 +0,0 @@
1title NUC5i5RYB boot
2linux /vmlinuz
3initrd /initrd
4options LABEL=boot rootwait
diff --git a/recipes-bsp/rmc/boards/NUC5i5RYB/install.conf b/recipes-bsp/rmc/boards/NUC5i5RYB/install.conf
deleted file mode 100644
index 0dca3cae..00000000
--- a/recipes-bsp/rmc/boards/NUC5i5RYB/install.conf
+++ /dev/null
@@ -1,4 +0,0 @@
1title NUC5i5RYB install
2linux /vmlinuz
3initrd /initrd
4options LABEL=install-efi rootwait
diff --git a/recipes-bsp/rmc/boards/NUC5i5RYB/nuc5i5.fp b/recipes-bsp/rmc/boards/NUC5i5RYB/nuc5i5.fp
deleted file mode 100644
index 57374779..00000000
--- a/recipes-bsp/rmc/boards/NUC5i5RYB/nuc5i5.fp
+++ /dev/null
Binary files differ
diff --git a/recipes-bsp/rmc/boards/T100-32bit/BOOTENTRY.CONFIG b/recipes-bsp/rmc/boards/T100-32bit/BOOTENTRY.CONFIG
deleted file mode 100644
index b2fabe82..00000000
--- a/recipes-bsp/rmc/boards/T100-32bit/BOOTENTRY.CONFIG
+++ /dev/null
@@ -1,2 +0,0 @@
1boot.conf
2install.conf
diff --git a/recipes-bsp/rmc/boards/T100-32bit/T100-32bit.fp b/recipes-bsp/rmc/boards/T100-32bit/T100-32bit.fp
deleted file mode 100644
index 86ecea73..00000000
--- a/recipes-bsp/rmc/boards/T100-32bit/T100-32bit.fp
+++ /dev/null
Binary files differ
diff --git a/recipes-bsp/rmc/boards/T100-32bit/boot.conf b/recipes-bsp/rmc/boards/T100-32bit/boot.conf
deleted file mode 100644
index f1578e0f..00000000
--- a/recipes-bsp/rmc/boards/T100-32bit/boot.conf
+++ /dev/null
@@ -1,4 +0,0 @@
1title T100T(32bit) boot
2linux /vmlinuz
3initrd /initrd
4options LABEL=boot loglevel=8
diff --git a/recipes-bsp/rmc/boards/T100-32bit/install.conf b/recipes-bsp/rmc/boards/T100-32bit/install.conf
deleted file mode 100644
index 67e7eb18..00000000
--- a/recipes-bsp/rmc/boards/T100-32bit/install.conf
+++ /dev/null
@@ -1,4 +0,0 @@
1title T100T(32bit) install
2linux /vmlinuz
3initrd /initrd
4options LABEL=install-efi
diff --git a/recipes-bsp/rmc/boards/broxton-m/BOOTENTRY.CONFIG b/recipes-bsp/rmc/boards/broxton-m/BOOTENTRY.CONFIG
deleted file mode 100644
index b2fabe82..00000000
--- a/recipes-bsp/rmc/boards/broxton-m/BOOTENTRY.CONFIG
+++ /dev/null
@@ -1,2 +0,0 @@
1boot.conf
2install.conf
diff --git a/recipes-bsp/rmc/boards/broxton-m/INSTALLER.CONFIG b/recipes-bsp/rmc/boards/broxton-m/INSTALLER.CONFIG
deleted file mode 100644
index ecd20609..00000000
--- a/recipes-bsp/rmc/boards/broxton-m/INSTALLER.CONFIG
+++ /dev/null
@@ -1,3 +0,0 @@
1# Keep rmc Joule boot.conf instead of meta-intel default
2efi_entry_dir:root:disk:770:/boot/loader/entries/
3boot.conf:root:disk:770:/boot/loader/entries/boot.conf
diff --git a/recipes-bsp/rmc/boards/broxton-m/KBOOTPARAM b/recipes-bsp/rmc/boards/broxton-m/KBOOTPARAM
deleted file mode 100644
index 08be5dfb..00000000
--- a/recipes-bsp/rmc/boards/broxton-m/KBOOTPARAM
+++ /dev/null
@@ -1 +0,0 @@
1video=efifb maxcpus=4 reboot=efi kmemleak=off console=tty0 console=ttyS2,115200
diff --git a/recipes-bsp/rmc/boards/broxton-m/POSTINSTALL.sh b/recipes-bsp/rmc/boards/broxton-m/POSTINSTALL.sh
deleted file mode 100644
index 30bbd28e..00000000
--- a/recipes-bsp/rmc/boards/broxton-m/POSTINSTALL.sh
+++ /dev/null
@@ -1,2 +0,0 @@
1# Joule uses only S2 for serial, so remove S0
2sed -i '/start_getty.\+ttyS0/d' /tgt_root/etc/inittab
diff --git a/recipes-bsp/rmc/boards/broxton-m/bm-1F1.fp b/recipes-bsp/rmc/boards/broxton-m/bm-1F1.fp
deleted file mode 100755
index 1a150280..00000000
--- a/recipes-bsp/rmc/boards/broxton-m/bm-1F1.fp
+++ /dev/null
Binary files differ
diff --git a/recipes-bsp/rmc/boards/broxton-m/bm.fp b/recipes-bsp/rmc/boards/broxton-m/bm.fp
deleted file mode 100755
index 135a7a5d..00000000
--- a/recipes-bsp/rmc/boards/broxton-m/bm.fp
+++ /dev/null
Binary files differ
diff --git a/recipes-bsp/rmc/boards/broxton-m/boot.conf b/recipes-bsp/rmc/boards/broxton-m/boot.conf
deleted file mode 100644
index caa00c50..00000000
--- a/recipes-bsp/rmc/boards/broxton-m/boot.conf
+++ /dev/null
@@ -1,4 +0,0 @@
1title Joule / Broxton-m
2linux /vmlinuz
3initrd /initrd
4options LABEL=boot
diff --git a/recipes-bsp/rmc/boards/broxton-m/install.conf b/recipes-bsp/rmc/boards/broxton-m/install.conf
deleted file mode 100644
index 9cdd86b7..00000000
--- a/recipes-bsp/rmc/boards/broxton-m/install.conf
+++ /dev/null
@@ -1,4 +0,0 @@
1title Joule / Broxton-m Install
2linux /vmlinuz
3initrd /initrd
4options LABEL=install-efi rootwait
diff --git a/recipes-bsp/rmc/boards/broxton-m/joule-1F1.fp b/recipes-bsp/rmc/boards/broxton-m/joule-1F1.fp
deleted file mode 100644
index d757614f..00000000
--- a/recipes-bsp/rmc/boards/broxton-m/joule-1F1.fp
+++ /dev/null
Binary files differ
diff --git a/recipes-bsp/rmc/boards/minnowmax/BOOTENTRY.CONFIG b/recipes-bsp/rmc/boards/minnowmax/BOOTENTRY.CONFIG
deleted file mode 100644
index b2fabe82..00000000
--- a/recipes-bsp/rmc/boards/minnowmax/BOOTENTRY.CONFIG
+++ /dev/null
@@ -1,2 +0,0 @@
1boot.conf
2install.conf
diff --git a/recipes-bsp/rmc/boards/minnowmax/boot.conf b/recipes-bsp/rmc/boards/minnowmax/boot.conf
deleted file mode 100644
index 6e789cd8..00000000
--- a/recipes-bsp/rmc/boards/minnowmax/boot.conf
+++ /dev/null
@@ -1,4 +0,0 @@
1title Minnow Max boot
2linux /vmlinuz
3initrd /initrd
4options LABEL=boot console=ttyS0,115200n8
diff --git a/recipes-bsp/rmc/boards/minnowmax/install.conf b/recipes-bsp/rmc/boards/minnowmax/install.conf
deleted file mode 100644
index 1a493aec..00000000
--- a/recipes-bsp/rmc/boards/minnowmax/install.conf
+++ /dev/null
@@ -1,4 +0,0 @@
1title Minnow Max install
2linux /vmlinuz
3initrd /initrd
4options LABEL=install-efi console=ttyS0,115200n8
diff --git a/recipes-bsp/rmc/boards/minnowmax/minnowmax.fp b/recipes-bsp/rmc/boards/minnowmax/minnowmax.fp
deleted file mode 100644
index 3c5a286f..00000000
--- a/recipes-bsp/rmc/boards/minnowmax/minnowmax.fp
+++ /dev/null
Binary files differ
diff --git a/recipes-bsp/rmc/boards/minnowmaxB3/BOOTENTRY.CONFIG b/recipes-bsp/rmc/boards/minnowmaxB3/BOOTENTRY.CONFIG
deleted file mode 100644
index b2fabe82..00000000
--- a/recipes-bsp/rmc/boards/minnowmaxB3/BOOTENTRY.CONFIG
+++ /dev/null
@@ -1,2 +0,0 @@
1boot.conf
2install.conf
diff --git a/recipes-bsp/rmc/boards/minnowmaxB3/boot.conf b/recipes-bsp/rmc/boards/minnowmaxB3/boot.conf
deleted file mode 100644
index 577e5d6a..00000000
--- a/recipes-bsp/rmc/boards/minnowmaxB3/boot.conf
+++ /dev/null
@@ -1,4 +0,0 @@
1title Minnow Max B3 boot
2linux /vmlinuz
3initrd /initrd
4options LABEL=boot console=ttyS0,115200n8
diff --git a/recipes-bsp/rmc/boards/minnowmaxB3/install.conf b/recipes-bsp/rmc/boards/minnowmaxB3/install.conf
deleted file mode 100644
index cf500d6c..00000000
--- a/recipes-bsp/rmc/boards/minnowmaxB3/install.conf
+++ /dev/null
@@ -1,4 +0,0 @@
1title Minnow Max B3 install
2linux /vmlinuz
3initrd /initrd
4options LABEL=install-efi console=ttyS0,115200n8
diff --git a/recipes-bsp/rmc/boards/minnowmaxB3/minnowmaxB3.fp b/recipes-bsp/rmc/boards/minnowmaxB3/minnowmaxB3.fp
deleted file mode 100644
index ad3f0d6d..00000000
--- a/recipes-bsp/rmc/boards/minnowmaxB3/minnowmaxB3.fp
+++ /dev/null
Binary files differ
diff --git a/recipes-bsp/rmc/boards/mohonpeak/BOOTENTRY.CONFIG b/recipes-bsp/rmc/boards/mohonpeak/BOOTENTRY.CONFIG
deleted file mode 100644
index b2fabe82..00000000
--- a/recipes-bsp/rmc/boards/mohonpeak/BOOTENTRY.CONFIG
+++ /dev/null
@@ -1,2 +0,0 @@
1boot.conf
2install.conf
diff --git a/recipes-bsp/rmc/boards/mohonpeak/INSTALLER.CONFIG b/recipes-bsp/rmc/boards/mohonpeak/INSTALLER.CONFIG
deleted file mode 100644
index 8c5a7678..00000000
--- a/recipes-bsp/rmc/boards/mohonpeak/INSTALLER.CONFIG
+++ /dev/null
@@ -1,3 +0,0 @@
1# Keep rmc Mohonpeak boot.conf instead of meta-intel default
2efi_entry_dir:root:disk:770:/boot/loader/entries/
3boot.conf:root:disk:770:/boot/loader/entries/boot.conf
diff --git a/recipes-bsp/rmc/boards/mohonpeak/KBOOTPARAM b/recipes-bsp/rmc/boards/mohonpeak/KBOOTPARAM
deleted file mode 100644
index 169056ee..00000000
--- a/recipes-bsp/rmc/boards/mohonpeak/KBOOTPARAM
+++ /dev/null
@@ -1 +0,0 @@
1console=ttyS1,115200 console=tty1
diff --git a/recipes-bsp/rmc/boards/mohonpeak/POSTINSTALL.sh b/recipes-bsp/rmc/boards/mohonpeak/POSTINSTALL.sh
deleted file mode 100644
index 5f440c38..00000000
--- a/recipes-bsp/rmc/boards/mohonpeak/POSTINSTALL.sh
+++ /dev/null
@@ -1,3 +0,0 @@
1# Mohonpeak uses only S1 for serial, so remove S0 and S2
2sed -i '/start_getty.\+ttyS0/d' /tgt_root/etc/inittab
3sed -i '/start_getty.\+ttyS2/d' /tgt_root/etc/inittab
diff --git a/recipes-bsp/rmc/boards/mohonpeak/boot.conf b/recipes-bsp/rmc/boards/mohonpeak/boot.conf
deleted file mode 100644
index 5b7a0f63..00000000
--- a/recipes-bsp/rmc/boards/mohonpeak/boot.conf
+++ /dev/null
@@ -1,4 +0,0 @@
1title Mohon Peak boot
2linux /vmlinuz
3initrd /initrd
4options LABEL=boot
diff --git a/recipes-bsp/rmc/boards/mohonpeak/install.conf b/recipes-bsp/rmc/boards/mohonpeak/install.conf
deleted file mode 100644
index dde3497d..00000000
--- a/recipes-bsp/rmc/boards/mohonpeak/install.conf
+++ /dev/null
@@ -1,4 +0,0 @@
1title Mohon Peak Install
2linux /vmlinuz
3initrd /initrd
4options LABEL=install-efi rootwait
diff --git a/recipes-bsp/rmc/boards/mohonpeak/mohonpeak.fp b/recipes-bsp/rmc/boards/mohonpeak/mohonpeak.fp
deleted file mode 100644
index bc4bdae4..00000000
--- a/recipes-bsp/rmc/boards/mohonpeak/mohonpeak.fp
+++ /dev/null
Binary files differ
diff --git a/recipes-bsp/rmc/boards/nucgen6/BOOTENTRY.CONFIG b/recipes-bsp/rmc/boards/nucgen6/BOOTENTRY.CONFIG
deleted file mode 100644
index b2fabe82..00000000
--- a/recipes-bsp/rmc/boards/nucgen6/BOOTENTRY.CONFIG
+++ /dev/null
@@ -1,2 +0,0 @@
1boot.conf
2install.conf
diff --git a/recipes-bsp/rmc/boards/nucgen6/INSTALLER.CONFIG b/recipes-bsp/rmc/boards/nucgen6/INSTALLER.CONFIG
deleted file mode 100644
index 7d5378b2..00000000
--- a/recipes-bsp/rmc/boards/nucgen6/INSTALLER.CONFIG
+++ /dev/null
@@ -1,6 +0,0 @@
1# This file specifies which file or dir RMC will install onto target.
2# Note the absolute path is referred from mount points in installation.
3efi_entry_dir:root:disk:770:/boot/loader/entries/
4boot.conf:root:disk:770:/boot/loader/entries/rmcboot.conf
5mylibdir:root:root:770:/tgt_root/etc/mylib/
6mylib.conf:root:root:660:/tgt_root/etc/mylib/mylib.conf
diff --git a/recipes-bsp/rmc/boards/nucgen6/KBOOTPARAM b/recipes-bsp/rmc/boards/nucgen6/KBOOTPARAM
deleted file mode 100644
index 27943b49..00000000
--- a/recipes-bsp/rmc/boards/nucgen6/KBOOTPARAM
+++ /dev/null
@@ -1 +0,0 @@
1i915.preliminary_hw_support=1
diff --git a/recipes-bsp/rmc/boards/nucgen6/POSTINSTALL.sh b/recipes-bsp/rmc/boards/nucgen6/POSTINSTALL.sh
deleted file mode 100644
index bec3be42..00000000
--- a/recipes-bsp/rmc/boards/nucgen6/POSTINSTALL.sh
+++ /dev/null
@@ -1,7 +0,0 @@
1# NUC Gen 6 specific retouch after RMC deployment
2
3# The generated inittab from OE build causes error messages:
4# "auth.err getty[615]: tcgetattr: Input/output error"
5# in /var/log/messages because NUC Gen 6 doesn't have any
6# serial tty. We delete line(s) here on target.
7sed -i '/start_getty.\+ttyS.*/d' /tgt_root/etc/inittab
diff --git a/recipes-bsp/rmc/boards/nucgen6/boot.conf b/recipes-bsp/rmc/boards/nucgen6/boot.conf
deleted file mode 100644
index e6ecb029..00000000
--- a/recipes-bsp/rmc/boards/nucgen6/boot.conf
+++ /dev/null
@@ -1,4 +0,0 @@
1title NUC Gen6 boot
2linux /vmlinuz
3initrd /initrd
4options LABEL=boot
diff --git a/recipes-bsp/rmc/boards/nucgen6/install.conf b/recipes-bsp/rmc/boards/nucgen6/install.conf
deleted file mode 100644
index 916bb04b..00000000
--- a/recipes-bsp/rmc/boards/nucgen6/install.conf
+++ /dev/null
@@ -1,4 +0,0 @@
1title NUC Gen6 install
2linux /vmlinuz
3initrd /initrd
4options LABEL=install-efi
diff --git a/recipes-bsp/rmc/boards/nucgen6/mylib.conf b/recipes-bsp/rmc/boards/nucgen6/mylib.conf
deleted file mode 100644
index fd8357c2..00000000
--- a/recipes-bsp/rmc/boards/nucgen6/mylib.conf
+++ /dev/null
@@ -1,7 +0,0 @@
1# This is a demo conf file read by an imagined program or library
2# which reads this file at runtime to customize its behavior.
3# rmc will deploy it to the location specified in INSTALLER.CONFIG.
4
5lib.info = "V1.0 for rmc demo"
6lib.board = "NUC gen 6"
7prog.ui.layout = "minimal"
diff --git a/recipes-bsp/rmc/boards/nucgen6/nuc6.fp b/recipes-bsp/rmc/boards/nucgen6/nuc6.fp
deleted file mode 100644
index 834f800b..00000000
--- a/recipes-bsp/rmc/boards/nucgen6/nuc6.fp
+++ /dev/null
Binary files differ
diff --git a/recipes-bsp/rmc/boards/qemu-2.6/KBOOTPARAM b/recipes-bsp/rmc/boards/qemu-2.6/KBOOTPARAM
deleted file mode 100644
index 476b1fbe..00000000
--- a/recipes-bsp/rmc/boards/qemu-2.6/KBOOTPARAM
+++ /dev/null
@@ -1 +0,0 @@
1console=ttyS0,115200
diff --git a/recipes-bsp/rmc/boards/qemu-2.6/qemu-2.6.fp b/recipes-bsp/rmc/boards/qemu-2.6/qemu-2.6.fp
deleted file mode 100644
index e4c41657..00000000
--- a/recipes-bsp/rmc/boards/qemu-2.6/qemu-2.6.fp
+++ /dev/null
Binary files differ
diff --git a/recipes-bsp/rmc/boards/qemu-2.8/KBOOTPARAM b/recipes-bsp/rmc/boards/qemu-2.8/KBOOTPARAM
deleted file mode 100644
index 476b1fbe..00000000
--- a/recipes-bsp/rmc/boards/qemu-2.8/KBOOTPARAM
+++ /dev/null
@@ -1 +0,0 @@
1console=ttyS0,115200
diff --git a/recipes-bsp/rmc/boards/qemu-2.8/qemu-2.8.fp b/recipes-bsp/rmc/boards/qemu-2.8/qemu-2.8.fp
deleted file mode 100644
index 7f28f37c..00000000
--- a/recipes-bsp/rmc/boards/qemu-2.8/qemu-2.8.fp
+++ /dev/null
Binary files differ
diff --git a/recipes-bsp/rmc/rmc-db.bb b/recipes-bsp/rmc/rmc-db.bb
deleted file mode 100644
index 7ec824a8..00000000
--- a/recipes-bsp/rmc/rmc-db.bb
+++ /dev/null
@@ -1,62 +0,0 @@
1SUMMARY = "Central RMC Database"
2DESCRIPTION = "Generate a centralized RMC database for RMC feature. \
3Fingerprints and data for all boards supported are specified by variable \
4RMC_BOARD_DATA_DIRS which is a list of top directories that contains \
5subdirectories for boards. Developers can add their top directories by appending \
6them to this variable in a rmc-db.bbappend.Refer to rmc-db bbclass for more \
7information."
8
9LICENSE = "MIT"
10
11LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
12
13S = "${WORKDIR}"
14
15inherit rmc-db
16
17RMC_BOARD_DATA_DIRS ?= "${THISDIR}/boards/"
18RMC_DB_DIR = "${WORKDIR}/db"
19
20FILES_${PN} = "/boot/rmc.db"
21
22# Let sstate be aware of change in any added board directories
23do_generate_rmc_db[file-checksums] = "${@get_rmc_top_dirs_list(d)}"
24
25# derived from get_lic_checksum_file_list(d) in base.bbclass in OE
26def get_rmc_top_dirs_list(d):
27 dirlist = []
28 dirs = d.getVar("RMC_BOARD_DATA_DIRS", True) or ''
29 topdirs = dirs.split()
30 for each in topdirs:
31 dirlist.append(each + ":" + str(os.path.exists(each)))
32 return " ".join(dirlist)
33
34do_generate_rmc_db () {
35 rmc_generate_db "${RMC_BOARD_DATA_DIRS}" "${RMC_DB_DIR}"/rmc.db
36}
37
38addtask generate_rmc_db after do_compile
39
40inherit deploy
41
42do_deploy () {
43 if [ -f ${RMC_DB_DIR}/rmc.db ]; then
44 install -m 0400 ${RMC_DB_DIR}/rmc.db ${DEPLOYDIR}
45 else
46 rm -f ${DEPLOYDIR}/rmc.db
47 echo "Warning: no RMC central database found, skip deployment."
48 fi
49}
50
51do_install () {
52 install -d ${D}/boot
53 if [ -f ${RMC_DB_DIR}/rmc.db ]; then
54 install -m 0400 ${RMC_DB_DIR}/rmc.db ${D}/boot/
55 else
56 rm -f ${D}/rmc.db
57 echo "Warning: no RMC central database found, skip installation."
58 fi
59}
60do_install[depends] += "${PN}:do_generate_rmc_db"
61
62addtask deploy after do_generate_rmc_db
diff --git a/recipes-bsp/rmc/rmc-efi.bb b/recipes-bsp/rmc/rmc-efi.bb
deleted file mode 100644
index 2a1c9a98..00000000
--- a/recipes-bsp/rmc/rmc-efi.bb
+++ /dev/null
@@ -1,40 +0,0 @@
1SUMMARY = "RMC (Runtime Machine Configuration) EFI library"
2
3DESCRIPTION = "The RMC EFI library adds RMC support to existing EFI bootloaders"
4
5LICENSE = "MIT"
6
7LIC_FILES_CHKSUM = "file://COPYING;md5=ade413c694d3aaefc9554b24a8814ee8"
8
9SRC_URI = "git://git.yoctoproject.org/rmc"
10
11SRCREV = "027ac76f642dcab1a9f237a00f03a3a714bd04b9"
12
13S = "${WORKDIR}/git"
14
15COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux*"
16
17TARGET_CFLAGS +="-Wl,--hash-style=both"
18
19EXTRA_OEMAKE = "RMC_INSTALL_PREFIX=${D}/${prefix} \
20 RMC_INSTALL_LIB_PATH=${D}${libdir} \
21 RMC_INSTALL_HEADER_PATH=${D}${includedir}/rmc"
22
23SECURITY_CFLAGS_remove_class-target = "-fstack-protector-strong"
24SECURITY_CFLAGS_append_class-target = " -fno-stack-protector"
25
26python () {
27 ccargs = d.getVar('TUNE_CCARGS').split()
28 if '-mx32' in ccargs:
29 ccargs.remove('-mx32')
30 ccargs.append('-m64')
31 d.setVar('TUNE_CCARGS', ' '.join(ccargs))
32}
33
34do_compile() {
35 oe_runmake -f Makefile.efi
36}
37
38do_install() {
39 oe_runmake -f Makefile.efi install
40}
diff --git a/recipes-bsp/rmc/rmc.bb b/recipes-bsp/rmc/rmc.bb
deleted file mode 100644
index 8797644b..00000000
--- a/recipes-bsp/rmc/rmc.bb
+++ /dev/null
@@ -1,46 +0,0 @@
1SUMMARY = "RMC (Runtime Machine Configuration)"
2
3DESCRIPTION = "RMC project provides a tool and libraries to identify types \
4of hardware boards and access any file-based data specific to the board's \
5type at runtime in a centralized way. Software (clients) can have a generic \
6logic to query board-specific data from RMC without knowing the type of board. \
7This make it possible to have a generic software work running on boards which \
8require any quirks or customizations at a board or product level. \
9"
10
11LICENSE = "MIT"
12
13LIC_FILES_CHKSUM = "file://COPYING;md5=ade413c694d3aaefc9554b24a8814ee8"
14
15SRC_URI = "git://git.yoctoproject.org/rmc"
16
17SRCREV = "027ac76f642dcab1a9f237a00f03a3a714bd04b9"
18
19S = "${WORKDIR}/git"
20
21COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux*"
22
23TARGET_CFLAGS +="-Wl,--hash-style=both"
24
25EXTRA_OEMAKE = "RMC_INSTALL_PREFIX=${D}/${prefix} \
26 RMC_INSTALL_BIN_PATH=${D}${bindir} \
27 RMC_INSTALL_LIB_PATH=${D}${libdir} \
28 RMC_INSTALL_HEADER_PATH=${D}${includedir}/rmc"
29
30SECURITY_CFLAGS_remove_class-target = "-fstack-protector-strong"
31SECURITY_CFLAGS_append_class-target = " -fno-stack-protector"
32
33do_compile_class-target() {
34 oe_runmake
35}
36
37do_install() {
38 oe_runmake install
39}
40
41do_install_class-native() {
42 install -d ${D}${STAGING_BINDIR_NATIVE}
43 install -m 0755 ${S}/src/rmc ${D}${STAGING_BINDIR_NATIVE}
44}
45
46BBCLASSEXTEND = "native"
diff --git a/recipes-bsp/systemd-boot/systemd-boot/0001-efi-boot.c-workaround-for-Joule-BIOS-hang.patch b/recipes-bsp/systemd-boot/systemd-boot/0001-efi-boot.c-workaround-for-Joule-BIOS-hang.patch
deleted file mode 100644
index 8d0b6149..00000000
--- a/recipes-bsp/systemd-boot/systemd-boot/0001-efi-boot.c-workaround-for-Joule-BIOS-hang.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1From 58669ad764767afea4de53f8a97357773b1855ef Mon Sep 17 00:00:00 2001
2From: Saul Wold <sgw@linux.intel.com>
3Date: Tue, 25 Oct 2016 12:54:08 -0700
4Subject: [PATCH] efi/boot.c: workaround for Joule BIOS hang
5
6This patch should be removed when the BIOS is fixed
7
8Authored-by: Steve Sakoman <steve@sakoman.com>
9
10Upstream-Status: Inappropriate [machine specific workaround]
11Signed-off-by: Saul Wold <sgw@linux.intel.com>
12---
13 src/boot/efi/boot.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c
17index 3dcd9a5..3c6ed8c 100644
18--- a/src/boot/efi/boot.c
19+++ b/src/boot/efi/boot.c
20@@ -649,7 +649,7 @@ static BOOLEAN menu_run(Config *config, ConfigEntry **chosen_entry, CHAR16 *load
21 }
22
23 /* timeout disabled, wait for next key */
24- wait = TRUE;
25+ wait = FALSE;
26 continue;
27 }
28
29--
302.7.4
31
diff --git a/recipes-bsp/systemd-boot/systemd-boot/0001-partially-revert-sd-boot-stub-Obtain-PE-section-offs.patch b/recipes-bsp/systemd-boot/systemd-boot/0001-partially-revert-sd-boot-stub-Obtain-PE-section-offs.patch
deleted file mode 100644
index 6d7b144d..00000000
--- a/recipes-bsp/systemd-boot/systemd-boot/0001-partially-revert-sd-boot-stub-Obtain-PE-section-offs.patch
+++ /dev/null
@@ -1,46 +0,0 @@
1From beb095f41d458b7d684c0cd6cac1749e2fc3f29b Mon Sep 17 00:00:00 2001
2From: California Sullivan <california.l.sullivan@intel.com>
3Date: Wed, 21 Mar 2018 13:01:26 -0700
4Subject: [PATCH 1/5] partially revert "sd-boot: stub: Obtain PE section
5 offsets from RAM, not disk (#6250)"
6
7Only revert the section for finding the root_dir, as RMC needs this to
8find its database file.
9
10Upstream-Status: Inappropriate [upstream doesn't need the root_dir].
11
12Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
13---
14 src/boot/efi/stub.c | 9 +++++++++
15 1 file changed, 9 insertions(+)
16
17diff --git a/src/boot/efi/stub.c b/src/boot/efi/stub.c
18index ff45cebd4..540ca5985 100644
19--- a/src/boot/efi/stub.c
20+++ b/src/boot/efi/stub.c
21@@ -30,6 +30,8 @@ static const EFI_GUID global_guid = EFI_GLOBAL_VARIABLE;
22
23 EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
24 EFI_LOADED_IMAGE *loaded_image;
25+ EFI_FILE *root_dir;
26+ CHAR16 *loaded_image_path;
27 CHAR8 *b;
28 UINTN size;
29 BOOLEAN secure = FALSE;
30@@ -58,6 +60,13 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
31 return err;
32 }
33
34+ root_dir = LibOpenRoot(loaded_image->DeviceHandle);
35+ if (!root_dir) {
36+ Print(L"Unable to open root directory: %r ", err);
37+ uefi_call_wrapper(BS->Stall, 1, 3 * 1000 * 1000);
38+ return EFI_LOAD_ERROR;
39+ }
40+
41 if (efivar_get_raw(&global_guid, L"SecureBoot", &b, &size) == EFI_SUCCESS) {
42 if (*b > 0)
43 secure = TRUE;
44--
452.14.3
46
diff --git a/recipes-bsp/systemd-boot/systemd-boot/0002-sd-boot-fix-RMC-compatibility-with-systemd-boot-and-.patch b/recipes-bsp/systemd-boot/systemd-boot/0002-sd-boot-fix-RMC-compatibility-with-systemd-boot-and-.patch
deleted file mode 100644
index a3e496f5..00000000
--- a/recipes-bsp/systemd-boot/systemd-boot/0002-sd-boot-fix-RMC-compatibility-with-systemd-boot-and-.patch
+++ /dev/null
@@ -1,62 +0,0 @@
1From af977853ab722194c4754e6693f430f50a42190f Mon Sep 17 00:00:00 2001
2From: California Sullivan <california.l.sullivan@intel.com>
3Date: Tue, 20 Mar 2018 10:08:14 -0700
4Subject: [PATCH 2/5] sd-boot: fix RMC compatibility with systemd-boot and
5 meson
6
7With autotools swapped out for meson a number of things need to be
8changed.
9
10Upstream-Status: Pending
11
12Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
13---
14 meson_options.txt | 2 ++
15 src/boot/efi/meson.build | 4 +++-
16 2 files changed, 5 insertions(+), 1 deletion(-)
17
18diff --git a/meson_options.txt b/meson_options.txt
19index 39822d6cd..d8a480401 100644
20--- a/meson_options.txt
21+++ b/meson_options.txt
22@@ -279,6 +279,8 @@ option('efi-ldsdir', type : 'string',
23 description : 'path to the EFI lds directory')
24 option('efi-includedir', type : 'string', value : '/usr/include/efi',
25 description : 'path to the EFI header directory')
26+option('rmc-includedir', type : 'string', value : '/usr/include/rmc',
27+ description : 'path to the RMC header directory')
28 option('tpm-pcrindex', type : 'string', value : '8',
29 description : 'TPM PCR register number to use')
30
31diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build
32index 9f9ec4911..266ff928f 100644
33--- a/src/boot/efi/meson.build
34+++ b/src/boot/efi/meson.build
35@@ -83,6 +83,7 @@ if have_gnu_efi
36 efi_conf.set_quoted('EFI_MACHINE_TYPE_NAME', EFI_MACHINE_TYPE_NAME)
37 efi_conf.set10('ENABLE_TPM', get_option('tpm'))
38 efi_conf.set('SD_TPM_PCR', get_option('tpm-pcrindex'))
39+ efi_conf.set('RMC_EFI', 'true')
40
41 efi_config_h = configure_file(
42 output : 'efi_config.h',
43@@ -121,6 +122,7 @@ if have_gnu_efi
44 '-Wsign-compare',
45 '-Wno-missing-field-initializers',
46 '-isystem', efi_incdir,
47+ '-isystem', get_option('rmc-includedir'),
48 '-isystem', join_paths(efi_incdir, gnu_efi_arch),
49 '-include', efi_config_h]
50 if efi_arch == 'x86_64'
51@@ -191,7 +193,7 @@ if have_gnu_efi
52 output : tuple[0],
53 command : efi_ld.split() + ['-o', '@OUTPUT@'] +
54 efi_ldflags + tuple[2] +
55- ['-lefi', '-lgnuefi', libgcc_file_name])
56+ ['-lefi', '-lgnuefi', '-lrmcefi', libgcc_file_name])
57
58 test('no-undefined-symbols-' + tuple[0],
59 no_undefined_symbols,
60--
612.14.3
62
diff --git a/recipes-bsp/systemd-boot/systemd-boot/0003-sd-boot-Load-board-specific-boot-entries-from-RMC-da.patch b/recipes-bsp/systemd-boot/systemd-boot/0003-sd-boot-Load-board-specific-boot-entries-from-RMC-da.patch
deleted file mode 100644
index cef934ce..00000000
--- a/recipes-bsp/systemd-boot/systemd-boot/0003-sd-boot-Load-board-specific-boot-entries-from-RMC-da.patch
+++ /dev/null
@@ -1,252 +0,0 @@
1From b780c67c780bae2f834d73017044680fabca4268 Mon Sep 17 00:00:00 2001
2From: Jianxun Zhang <jianxun.zhang@linux.intel.com>
3Date: Wed, 1 Jun 2016 16:32:22 -0700
4Subject: [PATCH 3/5] sd-boot: Load board-specific boot entries from RMC
5 database
6
7RMC provides a centralized database file on ESP. The DB contains
8fingerprints and any file blobs associated to physical boards.
9Callers can fetch board-specific data with fingerprint info
10collected from board at runtime if there is any record matched
11board's fingerprint.
12
13To let bootloader know which file blob in RMC should be queried,
14a special config file BOOTENTRY.CONFIG is defined as:
15
16boot.conf
17install.conf
18
19Bootloader calls RMC APIs and other functions to perform these
20tasks before it shows boot menu to user:
21
22(1) Load RMC database file from ESP
23(2) Collect fingerprint data from board
24(3) Query BOOTENTRY.CONFIG from RMC DB with fingerprint
25(4) Parse BOOTENTRY.CONFIG to know names of boot entry files
26(5) Query boot entry files one by one from RMC DB, and add
27 them into sd-boot config data.
28
29The final effect is that bootloader will show board-specific
30boot entries in boot menu to user. User then can choose one
31of them to boot system with the selected configuration.
32
33If any of these steps fails, bootloader simply skips loading
34RMC configs or any entry file not successfully fetched from
35RMC DB. Once any entry is loaded successfully from RMC DB,
36bootloader skips loading any boot entries from ESP.
37
38Upstream-Status: Pending
39
40Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
41Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
42---
43 src/boot/efi/boot.c | 148 +++++++++++++++++++++++++++++++++++++++++++++++++++-
44 1 file changed, 146 insertions(+), 2 deletions(-)
45
46diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c
47index b9c7c8394..93cfaf193 100644
48--- a/src/boot/efi/boot.c
49+++ b/src/boot/efi/boot.c
50@@ -16,6 +16,7 @@
51
52 #include <efi.h>
53 #include <efilib.h>
54+#include <rmc_api.h>
55
56 #include "console.h"
57 #include "disk.h"
58@@ -35,6 +36,9 @@ static const char __attribute__((used)) magic[] = "#### LoaderInfo: systemd-boot
59
60 static const EFI_GUID global_guid = EFI_GLOBAL_VARIABLE;
61
62+static CHAR8* rmc_db;
63+static rmc_fingerprint_t *rmc_fp;
64+
65 enum loader_type {
66 LOADER_UNDEFINED,
67 LOADER_EFI,
68@@ -1684,6 +1688,136 @@ static VOID config_free(Config *config) {
69 FreePool(config->entry_oneshot);
70 }
71
72+/* Derived from line_get_key_value(), we could consolidate two functions later */
73+static CHAR8 *get_line(CHAR8 *content, UINT64 *pos) {
74+ CHAR8 *line;
75+ UINT64 linelen;
76+
77+skip:
78+ line = content + *pos;
79+ if (*line == '\0')
80+ return NULL;
81+
82+ linelen = 0;
83+ while (line[linelen] && !strchra((CHAR8 *)"\n\r", line[linelen]))
84+ linelen++;
85+
86+ /* move pos to next line */
87+ *pos += linelen;
88+ if (content[*pos])
89+ (*pos)++;
90+
91+ /* empty line */
92+ if (linelen == 0)
93+ goto skip;
94+
95+ /* terminate line */
96+ line[linelen] = '\0';
97+
98+ /* remove leading whitespace */
99+ while (strchra((CHAR8 *)" \t", *line)) {
100+ line++;
101+ linelen--;
102+ }
103+
104+ /* remove trailing whitespace */
105+ while (linelen > 0 && strchra((CHAR8 *)" \t", line[linelen-1]))
106+ linelen--;
107+ line[linelen] = '\0';
108+
109+ if (*line == '#')
110+ goto skip;
111+
112+ return line;
113+}
114+
115+/* load rmc database file from ESP and try to get fingerprint. These
116+ * are essential information indicating we could query rmc data for
117+ * this board at least
118+ * return 0 if both database file and fingerprint can be obtained, otherwise
119+ * non-zero value is returned.
120+ *
121+ * Note: db and fp hold valid values only when this function returns 0.
122+ * Caller is responsible to free allocated memory pointed by *db and *fp when
123+ * this function returns 0.
124+ */
125+
126+static UINTN rmc_initialize(EFI_FILE *root_dir, EFI_SYSTEM_TABLE *sys_table, CHAR8 **db, rmc_fingerprint_t **fp) {
127+ UINTN len;
128+ UINTN ret = 1;
129+
130+ if (!db || !fp)
131+ return ret;
132+
133+ *db = NULL;
134+ *fp = NULL;
135+
136+ /* load rmc database */
137+ len = file_read(root_dir, L"\\rmc.db", 0, 0, db);
138+
139+ if (len <= 0)
140+ goto done;
141+
142+ *fp = AllocateZeroPool(sizeof(rmc_fingerprint_t));
143+ /* call rmc to get fingerprint. We will use single-action rmc APIs to query multiple files.
144+ * This should bring a better performance than calling double-action rmc API every time.
145+ */
146+ if (rmc_get_fingerprint(sys_table, *fp))
147+ goto done;
148+
149+ ret = 0;
150+done:
151+ if (ret) {
152+ FreePool(*db);
153+ FreePool(*fp);
154+ }
155+
156+ return ret;
157+}
158+
159+/* load RMC entries
160+ * return TRUE when at least one entry is loaded, otherwise, return FALSE
161+ */
162+static BOOLEAN config_load_rmc_entries(Config *config, EFI_HANDLE *device, CHAR16 *loaded_image_path, CHAR8 *db, rmc_fingerprint_t *fp) {
163+ CHAR8 *boot_entry = NULL;
164+ CHAR8 *boot_config = NULL;
165+ rmc_file_t rp;
166+ CHAR8 *line;
167+ UINT64 pos = 0;
168+ BOOLEAN ret = FALSE;
169+
170+ if (!db || !fp)
171+ return ret;
172+
173+ /* query boot entry config file */
174+ if (rmc_query_file_by_fp(fp, db, "BOOTENTRY.CONFIG", &rp))
175+ return ret;
176+
177+ /* file blob read from rmc db is not necessarily null-terminated, and we
178+ * should keep mem where rmc db lives from change during parsing
179+ */
180+ boot_config = AllocatePool(rp.blob_len * sizeof(CHAR8) + 1);
181+ CopyMem(boot_config, rp.blob, rp.blob_len);
182+ boot_config[rp.blob_len] = '\0';
183+ /* parse boot entry config */
184+ while ((line = get_line(boot_config, &pos))) {
185+ if (rmc_query_file_by_fp(fp, db, (char *)line, &rp))
186+ continue;
187+ if (rp.blob_len > 0) {
188+ boot_entry = AllocatePool(rp.blob_len * sizeof(CHAR8) + 1);
189+ CopyMem(boot_entry, rp.blob, rp.blob_len);
190+ boot_entry[rp.blob_len] = '\0';
191+ config_entry_add_from_file(config, device,
192+ stra_to_str(line), boot_entry,
193+ loaded_image_path);
194+ /* tell caller success when a RMC entry is loaded */
195+ ret = TRUE;
196+ }
197+ }
198+
199+ return ret;
200+}
201+
202 EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
203 CHAR16 *s;
204 CHAR8 *b;
205@@ -1696,6 +1830,7 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
206 UINT64 init_usec;
207 BOOLEAN menu = FALSE;
208 CHAR16 uuid[37];
209+ BOOLEAN rmc_entry = FALSE;
210
211 InitializeLib(image, sys_table);
212 init_usec = time_usec();
213@@ -1736,6 +1871,9 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
214 }
215 }
216
217+ /* Initialize rmc before loading any config */
218+ rmc_initialize(root_dir, sys_table, &rmc_db, &rmc_fp);
219+
220 /* the filesystem path to this image, to prevent adding ourselves to the menu */
221 loaded_image_path = DevicePathToStr(loaded_image->FilePath);
222 efivar_set(L"LoaderImageIdentifier", loaded_image_path, FALSE);
223@@ -1743,11 +1881,15 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
224 ZeroMem(&config, sizeof(Config));
225 config_load_defaults(&config, root_dir);
226
227+ if (rmc_db && rmc_fp)
228+ rmc_entry = config_load_rmc_entries(&config, loaded_image->DeviceHandle, loaded_image_path, rmc_db, rmc_fp);
229+
230 /* scan /EFI/Linux/ directory */
231 config_entry_add_linux(&config, loaded_image, root_dir);
232
233- /* scan /loader/entries/\*.conf files */
234- config_load_entries(&config, loaded_image->DeviceHandle, root_dir, loaded_image_path);
235+ /* scan /loader/entries/\*.conf files only when no RMC entry is loaded */
236+ if (rmc_entry == FALSE)
237+ config_load_entries(&config, loaded_image->DeviceHandle, root_dir, loaded_image_path);
238
239 /* sort entries after version number */
240 config_sort_entries(&config);
241@@ -1841,6 +1983,8 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
242 out:
243 FreePool(loaded_image_path);
244 config_free(&config);
245+ FreePool(rmc_db);
246+ FreePool(rmc_fp);
247 uefi_call_wrapper(root_dir->Close, 1, root_dir);
248 uefi_call_wrapper(BS->CloseProtocol, 4, image, &LoadedImageProtocol, image, NULL);
249 return err;
250--
2512.14.3
252
diff --git a/recipes-bsp/systemd-boot/systemd-boot/0004-sd-boot-Support-global-kernel-command-line-fragment.patch b/recipes-bsp/systemd-boot/systemd-boot/0004-sd-boot-Support-global-kernel-command-line-fragment.patch
deleted file mode 100644
index b4dd9c42..00000000
--- a/recipes-bsp/systemd-boot/systemd-boot/0004-sd-boot-Support-global-kernel-command-line-fragment.patch
+++ /dev/null
@@ -1,67 +0,0 @@
1From 159c8c54f92fb44d8abd2919fa83ad1cb640fac3 Mon Sep 17 00:00:00 2001
2From: Jianxun Zhang <jianxun.zhang@linux.intel.com>
3Date: Mon, 20 Jun 2016 13:08:20 -0700
4Subject: [PATCH 4/5] sd-boot: Support global kernel command line fragment
5
6Query file blob KBOOTPARAM from RMC. If it exists, we append
7it to the new linux boot entry's cmdline. A boot entry could
8be read from a .conf file on ESP, RMC database, or embedded
9linux image. content in KBOOTPARAM is effective in all of
10these cases.
11
12Upstream-Status: Pending
13
14Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
15Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
16---
17 src/boot/efi/boot.c | 34 ++++++++++++++++++++++++++++++++++
18 1 file changed, 34 insertions(+)
19
20diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c
21index 93cfaf193..2f400db3c 100644
22--- a/src/boot/efi/boot.c
23+++ b/src/boot/efi/boot.c
24@@ -851,6 +851,40 @@ static VOID config_add_entry(Config *config, ConfigEntry *entry) {
25 config->entries = ReallocatePool(config->entries,
26 sizeof(VOID *) * config->entry_count, sizeof(VOID *) * i);
27 }
28+
29+ /* rmc: a linux entry could be added from .conf file or an embedded linux image
30+ * we put appending global command line here to cover both of two cases.
31+ */
32+ if (entry->type == LOADER_LINUX && rmc_db && rmc_fp) {
33+ rmc_file_t rmc_kp;
34+
35+ if (!rmc_query_file_by_fp(rmc_fp, rmc_db, "KBOOTPARAM", &rmc_kp)) {
36+ CHAR8 *cmdline;
37+ CHAR16 *s;
38+ CHAR16 *t;
39+ CHAR16 *p;
40+
41+ cmdline = AllocatePool(rmc_kp.blob_len * sizeof(CHAR8) + 1);
42+ CopyMem(cmdline, rmc_kp.blob, rmc_kp.blob_len);
43+ cmdline[rmc_kp.blob_len] = '\0';
44+ p = stra_to_str(cmdline);
45+ t = p;
46+
47+ while (*t) {
48+ if (*t == '\n')
49+ *t = '\0';
50+ t++;
51+ }
52+
53+ s = PoolPrint(L"%s %s", entry->options, p);
54+ FreePool(entry->options);
55+ FreePool(p);
56+ FreePool(cmdline);
57+
58+ entry->options = s;
59+ }
60+ }
61+
62 config->entries[config->entry_count++] = entry;
63 }
64
65--
662.14.3
67
diff --git a/recipes-bsp/systemd-boot/systemd-boot/0005-sd-boot-support-global-kernel-command-line-in-EFI-st.patch b/recipes-bsp/systemd-boot/systemd-boot/0005-sd-boot-support-global-kernel-command-line-in-EFI-st.patch
deleted file mode 100644
index 60e93ca8..00000000
--- a/recipes-bsp/systemd-boot/systemd-boot/0005-sd-boot-support-global-kernel-command-line-in-EFI-st.patch
+++ /dev/null
@@ -1,82 +0,0 @@
1From 405a77233dde990fa7815d1546dc5a6b5a608479 Mon Sep 17 00:00:00 2001
2From: Mikko Ylinen <mikko.ylinen@intel.com>
3Date: Fri, 27 Jan 2017 13:31:45 +0200
4Subject: [PATCH 5/5] sd-boot: support global kernel command line in EFI stub
5
6This change integrates rmc into EFI stub and supports a
7global fragment (RMC KBOOTPARAM) that is appended to the
8cmdline at boot.
9
10The fragment is board-specific and read from the database.
11
12Implements [YOCTO #10924].
13
14Upstream-status: Pending
15
16Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
17Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
18---
19 src/boot/efi/stub.c | 33 +++++++++++++++++++++++++++++++++
20 1 file changed, 33 insertions(+)
21
22diff --git a/src/boot/efi/stub.c b/src/boot/efi/stub.c
23index 540ca5985..11047477b 100644
24--- a/src/boot/efi/stub.c
25+++ b/src/boot/efi/stub.c
26@@ -14,6 +14,7 @@
27
28 #include <efi.h>
29 #include <efilib.h>
30+#include <rmc_api.h>
31
32 #include "disk.h"
33 #include "graphics.h"
34@@ -49,6 +50,9 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
35 UINTN cmdline_len;
36 CHAR16 uuid[37];
37 EFI_STATUS err;
38+ INTN len;
39+ CHAR8 *rmc_db = NULL;
40+ rmc_file_t rmc_file;
41
42 InitializeLib(image, sys_table);
43
44@@ -109,6 +113,35 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) {
45 #endif
46 }
47
48+ len = file_read(root_dir, L"\\rmc.db", 0, 0, &rmc_db);
49+ if (len <= 0)
50+ rmc_db = NULL;
51+
52+ /* If the board has a fragment in rmc database, append it to the cmdline */
53+ if (rmc_db && !rmc_gimme_file(sys_table, rmc_db, "KBOOTPARAM", &rmc_file)) {
54+ CHAR8 *line;
55+ UINTN i = 0;
56+ UINTN j;
57+
58+ line = AllocatePool(rmc_file.blob_len + cmdline_len + 2);
59+
60+ while (i < cmdline_len && cmdline[i] != '\0') {
61+ line[i] = cmdline[i];
62+ i++;
63+ }
64+
65+ line[i++] = ' ';
66+
67+ for (j=0; j < rmc_file.blob_len; j++)
68+ line[i+j] = rmc_file.blob[j];
69+ line[i+j] = '\0';
70+
71+ cmdline = line;
72+ cmdline_len = i + j;
73+
74+ FreePool(rmc_db);
75+ }
76+
77 /* export the device path this image is started from */
78 if (disk_get_part_uuid(loaded_image->DeviceHandle, uuid) == EFI_SUCCESS)
79 efivar_set(L"LoaderDevicePartUUID", uuid, FALSE);
80--
812.14.3
82
diff --git a/recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc b/recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc
deleted file mode 100644
index bbe3aea2..00000000
--- a/recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc
+++ /dev/null
@@ -1,30 +0,0 @@
1# This patchset contains hooks that allows systemd-boot to use RMC capablilities.
2python __anonymous () {
3 import re
4 target = d.getVar('TARGET_ARCH')
5 prefix = "" if d.getVar('EFI_PROVIDER') == "rmc-boot" else "systemd-"
6 if target == "x86_64":
7 systemdimage = prefix + "bootx64.efi"
8 else:
9 systemdimage = prefix + "bootia32.efi"
10 d.setVar("SYSTEMD_BOOT_IMAGE", systemdimage)
11 prefix = "systemd-" if prefix == "" else ""
12 d.setVar("SYSTEMD_BOOT_IMAGE_PREFIX", prefix)
13}
14
15DEPENDS_append_intel-x86-common = " rmc rmc-efi"
16RDEPENDS_${PN}_append_intel-x86-common = " rmc-db"
17
18EXTRA_OEMESON_append_intel-x86-common = ' \
19 -Drmc-includedir="${STAGING_INCDIR}/rmc" \
20 '
21
22SRC_URI_append_intel-x86-common = " \
23 file://0001-partially-revert-sd-boot-stub-Obtain-PE-section-offs.patch \
24 file://0002-sd-boot-fix-RMC-compatibility-with-systemd-boot-and-.patch \
25 file://0003-sd-boot-Load-board-specific-boot-entries-from-RMC-da.patch \
26 file://0004-sd-boot-Support-global-kernel-command-line-fragment.patch \
27 file://0005-sd-boot-support-global-kernel-command-line-in-EFI-st.patch \
28 "
29
30RPROVIDES_${PN} += "rmc-boot"
diff --git a/recipes-bsp/systemd-boot/systemd-boot_%.bbappend b/recipes-bsp/systemd-boot/systemd-boot_%.bbappend
deleted file mode 100644
index 46dd8a44..00000000
--- a/recipes-bsp/systemd-boot/systemd-boot_%.bbappend
+++ /dev/null
@@ -1,18 +0,0 @@
1FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/systemd-boot:"
2
3SRC_URI_append_intel-x86-common = " \
4 file://0001-efi-boot.c-workaround-for-Joule-BIOS-hang.patch \
5 "
6
7PACKAGE_ARCH_intel-x86-common = "${INTEL_COMMON_PACKAGE_ARCH}"
8
9do_compile_append_intel-x86-common() {
10 ninja src/boot/efi/linux${SYSTEMD_BOOT_EFI_ARCH}.efi.stub
11}
12
13do_deploy_append_intel-x86-common() {
14 install ${B}/src/boot/efi/linux*.efi.stub ${DEPLOYDIR}
15}
16
17# includes rmc-boot.inc if rmc-boot is the EFI_PROVIDER
18include systemd-boot/${EFI_PROVIDER}.inc
diff --git a/recipes-bsp/thermald/files/0001-Include-poll.h-instead-of-sys-poll.h.patch b/recipes-bsp/thermald/files/0001-Include-poll.h-instead-of-sys-poll.h.patch
deleted file mode 100644
index 16d2ff10..00000000
--- a/recipes-bsp/thermald/files/0001-Include-poll.h-instead-of-sys-poll.h.patch
+++ /dev/null
@@ -1,36 +0,0 @@
1From b3de44c28cd930d68c17638575d46e590679f9fe Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Thu, 18 Jan 2018 10:10:40 +0800
4Subject: [PATCH] Include poll.h instead of sys/poll.h
5
6POSIX specifies poll.h to be the correct header name [1]. Also fixes
7a warning when built with musl.
8
9 | <sysroot>/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Werror=cpp]
10 | #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
11
12[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/poll.h.html
13
14Upstream-Status: Submitted [https://github.com/intel/thermal_daemon/pull/147]
15
16Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
17---
18 src/thd_kobj_uevent.h | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21diff --git a/src/thd_kobj_uevent.h b/src/thd_kobj_uevent.h
22index d30ea5c..aa8e33f 100644
23--- a/src/thd_kobj_uevent.h
24+++ b/src/thd_kobj_uevent.h
25@@ -28,7 +28,7 @@
26 #include <stdlib.h>
27 #include <string.h>
28
29-#include <sys/poll.h>
30+#include <poll.h>
31 #include <sys/socket.h>
32 #include <sys/types.h>
33 #include <unistd.h>
34--
352.7.4
36
diff --git a/recipes-bsp/thermald/files/0002-Use-correct-format-specifier-for-X32.patch b/recipes-bsp/thermald/files/0002-Use-correct-format-specifier-for-X32.patch
deleted file mode 100644
index 893b343a..00000000
--- a/recipes-bsp/thermald/files/0002-Use-correct-format-specifier-for-X32.patch
+++ /dev/null
@@ -1,87 +0,0 @@
1From fa6cfd59e52be6a45a067cc770adc62437295085 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Thu, 18 Jan 2018 14:29:09 +0800
4Subject: [PATCH 2/2] Use correct format specifier for X32
5
6time_t in x32 is of long long type. Using %ld specifier leads
7to errors like:
8
9| ../git/src/thd_model.cpp: In member function 'unsigned int cthd_model::update_set_point(unsigned int)':
10| ../git/src/thermald.h:74:68: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'time_t {aka long long int}' [-Werror=format=]
11| #define thd_log_info(...) g_log(NULL, G_LOG_LEVEL_INFO, __VA_ARGS__)
12| ^
13| ../git/src/thd_model.cpp:112:3: note: in expansion of macro 'thd_log_info'
14| thd_log_info("update_pid %ld %ld %d %g %d\n", now, last_time, error,
15| ^~~~~~~~~~~~
16
17Use the correct format specifier based on the address model.
18
19Upstream-Status: Submitted [https://github.com/intel/thermal_daemon/pull/147]
20
21Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
22---
23 src/thd_model.cpp | 14 ++++++++++++++
24 src/thd_trip_point.cpp | 6 ++++++
25 2 files changed, 20 insertions(+)
26
27diff --git a/src/thd_model.cpp b/src/thd_model.cpp
28index 5f1d0d7..46b95dc 100644
29--- a/src/thd_model.cpp
30+++ b/src/thd_model.cpp
31@@ -109,8 +109,14 @@ unsigned int cthd_model::update_set_point(unsigned int curr_temp) {
32 /*Compute PID Output*/
33 output = kp * error + ki * err_sum + kd * d_err;
34 _setpoint = max_temp - (unsigned int) output;
35+
36+#if defined __x86_64__ && defined __ILP32__
37+ thd_log_info("update_pid %lld %lld %d %g %d\n", now, last_time, error,
38+ output, _setpoint);
39+#else
40 thd_log_info("update_pid %ld %ld %d %g %d\n", now, last_time, error,
41 output, _setpoint);
42+#endif
43 if ((_setpoint < 0) || (abs(set_point - _setpoint) > max_compensation))
44 set_point -= max_compensation;
45 else
46@@ -134,10 +140,18 @@ void cthd_model::add_sample(int temperature) {
47 updated_set_point = false;
48 if (trend_increase_start == 0 && temperature > hot_zone) {
49 trend_increase_start = tm;
50+#if defined __x86_64__ && defined __ILP32__
51+ thd_log_debug("Trend increase start %lld\n", trend_increase_start);
52+#else
53 thd_log_debug("Trend increase start %ld\n", trend_increase_start);
54+#endif
55 } else if (trend_increase_start && temperature < hot_zone) {
56 int _set_point;
57+#if defined __x86_64__ && defined __ILP32__
58+ thd_log_debug("Trend increase stopped %lld\n", trend_increase_start);
59+#else
60 thd_log_debug("Trend increase stopped %ld\n", trend_increase_start);
61+#endif
62 trend_increase_start = 0;
63 _set_point = read_set_point(); // Restore set point to a calculated max
64 if (_set_point > set_point) {
65diff --git a/src/thd_trip_point.cpp b/src/thd_trip_point.cpp
66index dd1b881..170adcf 100644
67--- a/src/thd_trip_point.cpp
68+++ b/src/thd_trip_point.cpp
69@@ -132,9 +132,15 @@ bool cthd_trip_point::thd_trip_point_check(int id, unsigned int read_temp,
70 time_t tm;
71 time(&tm);
72 if ((tm - cdevs[i].last_op_time) < cdevs[i].sampling_priod) {
73+#if defined __x86_64__ && defined __ILP32__
74+ thd_log_info("Too early to act index %d tm %lld\n",
75+ cdev->thd_cdev_get_index(),
76+ tm - cdevs[i].last_op_time);
77+#else
78 thd_log_info("Too early to act index %d tm %ld\n",
79 cdev->thd_cdev_get_index(),
80 tm - cdevs[i].last_op_time);
81+#endif
82 break;
83 }
84 cdevs[i].last_op_time = tm;
85--
862.7.4
87
diff --git a/recipes-core/images/core-image-minimal-initramfs.bbappend b/recipes-core/images/core-image-minimal-initramfs.bbappend
index b3d5836a..90ac28fd 100644
--- a/recipes-core/images/core-image-minimal-initramfs.bbappend
+++ b/recipes-core/images/core-image-minimal-initramfs.bbappend
@@ -1,6 +1,2 @@
1# Use initramfs-framework instead of initramfs-live*
2PACKAGE_INSTALL_remove_intel-x86-common = "initramfs-live-boot initramfs-live-install initramfs-live-install-efi"
3PACKAGE_INSTALL_append_intel-x86-common = " initramfs-framework-base initramfs-module-udev initramfs-module-setup-live initramfs-module-install initramfs-module-install-efi"
4
5# Add i915 graphics firmware 1# Add i915 graphics firmware
6PACKAGE_INSTALL_append_intel-x86-common = " linux-firmware-i915" 2PACKAGE_INSTALL:append:intel-x86-common = " linux-firmware-i915"
diff --git a/recipes-core/images/core-image-tiny.bb b/recipes-core/images/core-image-tiny.bb
index 6b09b0c2..f521f668 100644
--- a/recipes-core/images/core-image-tiny.bb
+++ b/recipes-core/images/core-image-tiny.bb
@@ -32,5 +32,5 @@ python() {
32 d.appendVarFlag('do_image', 'depends', ' %s:do_image_complete' % initrd_i) 32 d.appendVarFlag('do_image', 'depends', ' %s:do_image_complete' % initrd_i)
33} 33}
34 34
35WKS_FILE_intel-corei7-64 = "core-image-tiny.wks.in" 35WKS_FILE:intel-corei7-64 = "core-image-tiny.wks.in"
36WKS_FILE_intel-core2-32 = "core-image-tiny.wks.in" 36WKS_FILE:intel-core2-32 = "core-image-tiny.wks.in"
diff --git a/recipes-core/initrdscripts/files/intel-x86-common/init-install-efi.sh b/recipes-core/initrdscripts/files/intel-x86-common/init-install-efi.sh
deleted file mode 100644
index a7a2ad4c..00000000
--- a/recipes-core/initrdscripts/files/intel-x86-common/init-install-efi.sh
+++ /dev/null
@@ -1,342 +0,0 @@
1#!/bin/sh -e
2#
3# Copyright (c) 2016, Intel Corporation.
4# All rights reserved.
5#
6# install.sh [device_name] [rootfs_name]
7#
8# This file is a copy of file with same name in OE:
9# meta/recipes-core/initrdscripts/files/. We modify
10# it for RMC feature to deploy file blobs from RMC
11# database file to target.
12
13PATH=/sbin:/bin:/usr/sbin:/usr/bin
14
15# We need 20 Mb for the boot partition
16boot_size=20
17
18# 5% for swap
19swap_ratio=5
20
21# Get a list of hard drives
22hdnamelist=""
23live_dev_name=`cat /proc/mounts | grep ${1%/} | awk '{print $1}'`
24live_dev_name=${live_dev_name#\/dev/}
25# Only strip the digit identifier if the device is not an mmc
26case $live_dev_name in
27 mmcblk*)
28 ;;
29 nvme*)
30 ;;
31 *)
32 live_dev_name=${live_dev_name%%[0-9]*}
33 ;;
34esac
35
36echo "Searching for hard drives ..."
37
38for device in `ls /sys/block/`; do
39 case $device in
40 loop*)
41 # skip loop device
42 ;;
43 sr*)
44 # skip CDROM device
45 ;;
46 ram*)
47 # skip ram device
48 ;;
49 *)
50 # skip the device LiveOS is on
51 # Add valid hard drive name to the list
52 case $device in
53 $live_dev_name*)
54 # skip the device we are running from
55 ;;
56 *)
57 hdnamelist="$hdnamelist $device"
58 ;;
59 esac
60 ;;
61 esac
62done
63
64if [ -z "${hdnamelist}" ]; then
65 echo "You need another device (besides the live device /dev/${live_dev_name}) to install the image. Installation aborted."
66 exit 1
67fi
68
69TARGET_DEVICE_NAME=""
70for hdname in $hdnamelist; do
71 # Display found hard drives and their basic info
72 echo "-------------------------------"
73 echo /dev/$hdname
74 if [ -r /sys/block/$hdname/device/vendor ]; then
75 echo -n "VENDOR="
76 cat /sys/block/$hdname/device/vendor
77 fi
78 if [ -r /sys/block/$hdname/device/model ]; then
79 echo -n "MODEL="
80 cat /sys/block/$hdname/device/model
81 fi
82 if [ -r /sys/block/$hdname/device/uevent ]; then
83 echo -n "UEVENT="
84 cat /sys/block/$hdname/device/uevent
85 fi
86 echo
87done
88
89# Get user choice
90while true; do
91 echo "Please select an install target or press n to exit ($hdnamelist ): "
92 read answer
93 if [ "$answer" = "n" ]; then
94 echo "Installation manually aborted."
95 exit 1
96 fi
97 for hdname in $hdnamelist; do
98 if [ "$answer" = "$hdname" ]; then
99 TARGET_DEVICE_NAME=$answer
100 break
101 fi
102 done
103 if [ -n "$TARGET_DEVICE_NAME" ]; then
104 break
105 fi
106done
107
108if [ -n "$TARGET_DEVICE_NAME" ]; then
109 echo "Installing image on /dev/$TARGET_DEVICE_NAME ..."
110else
111 echo "No hard drive selected. Installation aborted."
112 exit 1
113fi
114
115device=/dev/$TARGET_DEVICE_NAME
116
117#
118# The udev automounter can cause pain here, kill it
119#
120rm -f /etc/udev/rules.d/automount.rules
121rm -f /etc/udev/scripts/mount*
122
123#
124# Unmount anything the automounter had mounted
125#
126umount ${device}* 2> /dev/null || /bin/true
127
128mkdir -p /tmp
129
130# Create /etc/mtab if not present
131if [ ! -e /etc/mtab ]; then
132 cat /proc/mounts > /etc/mtab
133fi
134
135disk_size=$(parted ${device} unit mb print | grep '^Disk .*: .*MB' | cut -d" " -f 3 | sed -e "s/MB//")
136
137swap_size=$((disk_size*swap_ratio/100))
138rootfs_size=$((disk_size-boot_size-swap_size))
139
140rootfs_start=$((boot_size))
141rootfs_end=$((rootfs_start+rootfs_size))
142swap_start=$((rootfs_end))
143
144# MMC devices are special in a couple of ways
145# 1) they use a partition prefix character 'p'
146# 2) they are detected asynchronously (need rootwait)
147rootwait=""
148part_prefix=""
149if [ ! "${device#/dev/mmcblk}" = "${device}" ] || \
150[ ! "${device#/dev/nvme}" = "${device}" ]; then
151 part_prefix="p"
152 rootwait="rootwait"
153fi
154bootfs=${device}${part_prefix}1
155rootfs=${device}${part_prefix}2
156swap=${device}${part_prefix}3
157
158echo "*****************"
159echo "Boot partition size: $boot_size MB ($bootfs)"
160echo "Rootfs partition size: $rootfs_size MB ($rootfs)"
161echo "Swap partition size: $swap_size MB ($swap)"
162echo "*****************"
163echo "Deleting partition table on ${device} ..."
164dd if=/dev/zero of=${device} bs=512 count=35
165
166echo "Creating new partition table on ${device} ..."
167parted ${device} mklabel gpt
168
169echo "Creating boot partition on $bootfs"
170parted ${device} mkpart boot fat32 0% $boot_size
171parted ${device} set 1 boot on
172
173echo "Creating rootfs partition on $rootfs"
174parted ${device} mkpart root ext3 $rootfs_start $rootfs_end
175
176echo "Creating swap partition on $swap"
177parted ${device} mkpart swap linux-swap $swap_start 100%
178
179parted ${device} print
180
181echo "Formatting $bootfs to vfat..."
182mkfs.vfat $bootfs
183
184echo "Formatting $rootfs to ext3..."
185mkfs.ext3 $rootfs
186
187echo "Formatting swap partition...($swap)"
188mkswap $swap
189
190mkdir /tgt_root
191mkdir /src_root
192mkdir -p /boot
193
194# Handling of the target root partition
195mount $rootfs /tgt_root
196mount -o rw,loop,noatime,nodiratime /run/media/$1/$2 /src_root
197echo "Copying rootfs files..."
198cp -a /src_root/* /tgt_root
199if [ -d /tgt_root/etc/ ] ; then
200 boot_uuid=$(blkid -o value -s UUID ${bootfs})
201 swap_part_uuid=$(blkid -o value -s PARTUUID ${swap})
202 echo "/dev/disk/by-partuuid/$swap_part_uuid swap swap defaults 0 0" >> /tgt_root/etc/fstab
203 echo "UUID=$boot_uuid /boot vfat defaults 1 2" >> /tgt_root/etc/fstab
204 # We dont want udev to mount our root device while we're booting...
205 if [ -d /tgt_root/etc/udev/ ] ; then
206 echo "${device}" >> /tgt_root/etc/udev/mount.blacklist
207 fi
208fi
209
210# Handling of the target boot partition
211mount $bootfs /boot
212echo "Preparing boot partition..."
213
214EFIDIR="/boot/EFI/BOOT"
215mkdir -p $EFIDIR
216# Copy the efi loader
217cp /run/media/$1/EFI/BOOT/*.efi $EFIDIR
218
219# RMC deployment
220RMC_CMD=/src_root/usr/bin/rmc
221RMC_DB=/run/media/$1/rmc.db
222
223# We don't want to quit when a step failed. For example,
224# a file system could not support some operations.
225set +e
226
227if [ -f "${RMC_DB}" ] && [ -f "${RMC_CMD}" ]; then
228 echo "Found RMC database and tool, start RMC deployment"
229 # query INSTALLER.CONFIG from RMC DB
230 if ${RMC_CMD} -B INSTALLER.CONFIG -d "${RMC_DB}" -o /tmp/installer.config; then
231 while IFS=':' read -r NAME TGT_UID TGT_GID TGT_MODE TGT_PATH; do
232 # skip comment
233 # The regexp in grep works with busybox grep which doesn't
234 # seem to have a -P to recognize '\t'. But this expression could not
235 # work with gnu grep...
236 if echo "$NAME"|grep -q $'^[ \t]*#'; then
237 continue
238 fi
239 # check if we should create a directory (last char in target path is '/')
240 # or deploy a file
241 LAST_CHAR=$(echo "${TGT_PATH:$((${#TGT_PATH}-1)):1}")
242
243 # Do not bail out for failures but user should get stderr message
244 if [ ${LAST_CHAR} = "/" ]; then
245 # name field is skipped for directory
246 echo "DIR: ${TGT_UID}:${TGT_GID}:${TGT_MODE} => ${TGT_PATH}"
247 mkdir -p "$TGT_PATH"
248 chown "${TGT_UID}:${TGT_GID}" "$TGT_PATH"
249 chmod "${TGT_MODE}" "$TGT_PATH"
250 else
251 ${RMC_CMD} -B "${NAME}" -d "${RMC_DB}" -o "${TGT_PATH}"
252 echo "FILE: ${NAME}:${TGT_UID}:${TGT_GID}:${TGT_MODE} => ${TGT_PATH}"
253 chown "${TGT_UID}:${TGT_GID}" "$TGT_PATH"
254 chmod "${TGT_MODE}" "$TGT_PATH"
255 fi
256 done < /tmp/installer.config
257 rm -rf /tmp/installer.config
258
259 # remove rmc from target since we don't think it is a valid
260 # case to run rmc after installation.
261 rm -rf /tgt_root/usr/bin/rmc
262 echo "RMC deployment finished"
263 else
264 echo "INSTALLER.CONFIG is not found, skip RMC deployment"
265 fi
266
267 # Final retouching by calling post-install hook
268 if ${RMC_CMD} -B POSTINSTALL.sh -d "${RMC_DB}" -o /tmp/POSTINSTALL.sh; then
269 echo "Found POSTINSTALL.sh execute it..."
270 chmod 500 /tmp/POSTINSTALL.sh
271 /tmp/POSTINSTALL.sh
272 rm -rf /tmp/POSTINSTALL.sh
273 fi
274fi
275set -e
276
277if [ -f /run/media/$1/EFI/BOOT/grub.cfg ]; then
278 root_part_uuid=$(blkid -o value -s PARTUUID ${rootfs})
279 GRUBCFG="$EFIDIR/grub.cfg"
280 cp /run/media/$1/EFI/BOOT/grub.cfg $GRUBCFG
281 # Update grub config for the installed image
282 # Delete the install entry
283 sed -i "/menuentry 'install'/,/^}/d" $GRUBCFG
284 # Delete the initrd lines
285 sed -i "/initrd /d" $GRUBCFG
286 # Delete any LABEL= strings
287 sed -i "s/ LABEL=[^ ]*/ /" $GRUBCFG
288 # Delete any root= strings
289 sed -i "s/ root=[^ ]*/ /g" $GRUBCFG
290 # Add the root= and other standard boot options
291 sed -i "s@linux /vmlinuz *@linux /vmlinuz root=PARTUUID=$root_part_uuid rw $rootwait quiet @" $GRUBCFG
292fi
293
294if [ -d /run/media/$1/loader ]; then
295 rootuuid=$(blkid -o value -s PARTUUID ${rootfs})
296 GUMMIBOOT_CFGS="/boot/loader/entries/*.conf"
297 if [ -d /boot/loader ]; then
298 # Don't override loader.conf RMC already deployed
299 if [ ! -f /boot/loader/loader.conf ]; then
300 cp /run/media/$1/loader/loader.conf /boot/loader/
301 fi
302 # only copy built OE entries when RMC entries don't exist.
303 if [ ! -d /boot/loader/entries ] || [ ! ls /boot/loader/entries/*.conf &>/dev/null ]; then
304 cp -dr /run/media/$1/loader/entries /boot/loader
305 fi
306 else
307 # copy config files for gummiboot
308 cp -dr /run/media/$1/loader /boot
309 # delete the install entry
310 rm -f /boot/loader/entries/install.conf
311 fi
312 # delete the initrd lines
313 sed -i "/initrd /d" $GUMMIBOOT_CFGS
314 # delete any LABEL= strings
315 sed -i "s/ LABEL=[^ ]*/ /" $GUMMIBOOT_CFGS
316 # delete any root= strings
317 sed -i "s/ root=[^ ]*/ /" $GUMMIBOOT_CFGS
318 # add the root= and other standard boot options
319 sed -i "s@options *@options root=PARTUUID=$rootuuid rw $rootwait quiet @" $GUMMIBOOT_CFGS
320 # if RMC feature presents, append global kernel command line fragment when it exists.
321 if [ -f "${RMC_DB}" ] && [ -f "${RMC_CMD}" ]; then
322 if ${RMC_CMD} -B KBOOTPARAM -d "${RMC_DB}" -o /tmp/kbootparam; then
323 sed -i "/^[ \t]*options/ s/$/ $(cat /tmp/kbootparam)/" $GUMMIBOOT_CFGS
324 rm /tmp/kbootparam
325 fi
326 fi
327fi
328
329cp /run/media/$1/vmlinuz /boot
330
331umount /src_root
332umount /tgt_root
333umount /boot
334
335sync
336
337echo "Remove your installation media, and press ENTER"
338
339read enter
340
341echo "Rebooting..."
342reboot -f
diff --git a/recipes-core/initrdscripts/initramfs-live-install-efi_%.bbappend b/recipes-core/initrdscripts/initramfs-live-install-efi_%.bbappend
deleted file mode 100644
index 0b3a1d3d..00000000
--- a/recipes-core/initrdscripts/initramfs-live-install-efi_%.bbappend
+++ /dev/null
@@ -1,2 +0,0 @@
1FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/files:"
2PACKAGE_ARCH_intel-x86-common = "${INTEL_COMMON_PACKAGE_ARCH}"
diff --git a/recipes-core/libxcam/libxcam/0001-fake_v4l2_device.h-fix-narrowing-warning.patch b/recipes-core/libxcam/libxcam/0001-fake_v4l2_device.h-fix-narrowing-warning.patch
new file mode 100644
index 00000000..f15d5cc7
--- /dev/null
+++ b/recipes-core/libxcam/libxcam/0001-fake_v4l2_device.h-fix-narrowing-warning.patch
@@ -0,0 +1,94 @@
1From d4c97b50b577ea16b9ff6d9a352ab474a119310e Mon Sep 17 00:00:00 2001
2From: Naveen Saini <naveen.kumar.saini@intel.com>
3Date: Wed, 18 May 2022 15:41:24 +0800
4Subject: [PATCH] fake_v4l2_device.h: fix narrowing warning
5
6Use uint32_t instead of int for IOCTLs commands.
7
8Warning log:
9| ../../../git/xcore/fake_v4l2_device.h: In member function 'virtual int XCam::FakeV4l2Device::io_control(int, void*)':
10| ../../../git/xcore/fake_v4l2_device.h:42:14: error: narrowing conversion of '3225441794' from 'long unsigned int' to 'int' [-Wnarrowing]
11| 42 | case VIDIOC_ENUM_FMT:
12| | ^~~~~~~~~~~~~~~
13| make[4]: *** [Makefile:685: libgstxcamsrc_la-gstxcamsrc.lo] Error 1
14
15Issue: https://github.com/intel/libxcam/issues/801
16Upstream-Status: Submitted [https://github.com/intel/libxcam/pull/802]
17
18Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
19---
20 xcore/base/xcam_common.h | 2 +-
21 xcore/fake_v4l2_device.h | 2 +-
22 xcore/v4l2_device.cpp | 2 +-
23 xcore/v4l2_device.h | 2 +-
24 xcore/xcam_common.cpp | 2 +-
25 5 files changed, 5 insertions(+), 5 deletions(-)
26
27diff --git a/xcore/base/xcam_common.h b/xcore/base/xcam_common.h
28index 1f16e1e..4aa6cb9 100644
29--- a/xcore/base/xcam_common.h
30+++ b/xcore/base/xcam_common.h
31@@ -75,7 +75,7 @@ void xcam_free (void *ptr);
32 * return, 0 successfully
33 * else, check errno
34 */
35-int xcam_device_ioctl (int fd, int cmd, void *arg);
36+int xcam_device_ioctl (int fd, uint32_t cmd, void *arg);
37 const char *xcam_fourcc_to_string (uint32_t fourcc);
38
39 void xcam_set_log (const char* file_name);
40diff --git a/xcore/fake_v4l2_device.h b/xcore/fake_v4l2_device.h
41index f679c19..e29787d 100644
42--- a/xcore/fake_v4l2_device.h
43+++ b/xcore/fake_v4l2_device.h
44@@ -33,7 +33,7 @@ public:
45 : V4l2Device ("/dev/null")
46 {}
47
48- int io_control (int cmd, void *arg)
49+ int io_control (uint32_t cmd, void *arg)
50 {
51 XCAM_UNUSED (arg);
52
53diff --git a/xcore/v4l2_device.cpp b/xcore/v4l2_device.cpp
54index 395461e..66a8ac6 100644
55--- a/xcore/v4l2_device.cpp
56+++ b/xcore/v4l2_device.cpp
57@@ -185,7 +185,7 @@ V4l2Device::close ()
58 }
59
60 int
61-V4l2Device::io_control (int cmd, void *arg)
62+V4l2Device::io_control (uint32_t cmd, void *arg)
63
64 {
65 if (_fd <= 0)
66diff --git a/xcore/v4l2_device.h b/xcore/v4l2_device.h
67index b4ad7ad..2551a92 100644
68--- a/xcore/v4l2_device.h
69+++ b/xcore/v4l2_device.h
70@@ -104,7 +104,7 @@ public:
71 XCamReturn queue_buffer (SmartPtr<V4l2Buffer> &buf);
72
73 // use as less as possible
74- virtual int io_control (int cmd, void *arg);
75+ virtual int io_control (uint32_t cmd, void *arg);
76
77 protected:
78
79diff --git a/xcore/xcam_common.cpp b/xcore/xcam_common.cpp
80index 848884d..d4d5093 100644
81--- a/xcore/xcam_common.cpp
82+++ b/xcore/xcam_common.cpp
83@@ -53,7 +53,7 @@ void xcam_free(void *ptr)
84 free (ptr);
85 }
86
87-int xcam_device_ioctl (int fd, int cmd, void *arg)
88+int xcam_device_ioctl (int fd, uint32_t cmd, void *arg)
89 {
90 int ret = 0;
91 int tried_time = 0;
92--
932.25.1
94
diff --git a/recipes-core/libxcam/libxcam_1.5.0.bb b/recipes-core/libxcam/libxcam_1.5.0.bb
new file mode 100644
index 00000000..31e9344b
--- /dev/null
+++ b/recipes-core/libxcam/libxcam_1.5.0.bb
@@ -0,0 +1,39 @@
1SUMMARY = "libXCam is a project for extended camera(not limited in camera) \
2features and focus on image quality improvement and video analysis"
3LICENSE = "Apache-2.0"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=8c911f084a3e5f46b21582a6cc9973e6"
5SECTION = "lib"
6
7inherit autotools pkgconfig
8
9S = "${WORKDIR}/git"
10SRCREV = "231a1d5243cd45c7a6b511b667f1ec52178fdda8"
11SRC_URI = "git://github.com/intel/libxcam.git;branch=1.5.0;protocol=https \
12 file://0001-fake_v4l2_device.h-fix-narrowing-warning.patch \
13"
14
15COMPATIBLE_HOST:libc-musl = "null"
16
17PACKAGECONFIG ??= " gst \
18 ${@bb.utils.contains("DISTRO_FEATURES", "opengl", "gles", "", d)} \
19 ${@bb.utils.contains("DISTRO_FEATURES", "vulkan", "vulkan", "", d)} \
20 "
21
22PACKAGECONFIG[gst] = "--enable-gst, --disable-gst, gstreamer1.0 gstreamer1.0-plugins-base"
23PACKAGECONFIG[aiq] = "--enable-aiq, --disable-aiq,"
24PACKAGECONFIG[libcl] = "--enable-libcl, --disable-libcl,"
25PACKAGECONFIG[opencv] = "--enable-opencv, --disable-opencv, opencv"
26PACKAGECONFIG[render] = "--enable-render, --disable-render,"
27PACKAGECONFIG[gles] = "--enable-gles, --disable-gles, virtual/mesa"
28PACKAGECONFIG[vulkan] = "--enable-vulkan, --disable-vulkan, vulkan-loader virtual/mesa"
29PACKAGECONFIG[dnn] = "--enable-dnn, --disable-dnn,"
30
31do_install:append () {
32 install -d ${D}${bindir}/libxcam
33 cp -r ${WORKDIR}/build/tests/.libs/* ${D}${bindir}/libxcam/
34}
35
36FILES:${PN} += "${libdir}/gstreamer-*/*.so"
37FILES:${PN}-test = "${bindir}/libxcam/*"
38PACKAGES =+ "${PN}-test"
39RDEPENDS:${PN}-test =+ "bash"
diff --git a/recipes-core/meta/icx-environment.inc b/recipes-core/meta/icx-environment.inc
new file mode 100644
index 00000000..65322a91
--- /dev/null
+++ b/recipes-core/meta/icx-environment.inc
@@ -0,0 +1,15 @@
1export ICX_LDFLAGS_OPTION = " -Wl,-dynamic-linker,/lib/ld-linux-x86-64.so.2"
2export ICXSDK_PREFIX_OPTION = "-B ${TARGET_PREFIX}"
3export ICXQSDK_PREFIX_OPTION = "-qgnu-prefix=${TARGET_PREFIX}"
4
5create_sdk_files:append() {
6 script=${SDK_OUTPUT}/${SDKPATH}/environment-setup-${REAL_MULTIMACH_TARGET_SYS}
7 if ${@bb.utils.contains('ICXSDK', '1', 'true', 'false', d)}; then
8 echo 'export ICX="icx ${ICXSDK_PREFIX_OPTION} --target=${TARGET_SYS} ${TARGET_CC_ARCH} --sysroot=$SDKTARGETSYSROOT ${ICX_LDFLAGS_OPTION}"' >> $script
9 echo 'export ICXCXX="icpx ${ICXSDK_PREFIX_OPTION} --target=${TARGET_SYS} ${TARGET_CC_ARCH} --sysroot=$SDKTARGETSYSROOT ${ICX_LDFLAGS_OPTION}"' >> $script
10 echo 'export ICXCPP="icx ${ICXSDK_PREFIX_OPTION} -E --target=${TARGET_SYS} ${TARGET_CC_ARCH} --sysroot=$SDKTARGETSYSROOT ${ICX_LDFLAGS_OPTION}"' >> $script
11 echo 'export ICXLD="xild --sysroot=$SDKTARGETSYSROOT "' >> $script
12 echo 'export ICXCCLD="icx ${ICXSDK_PREFIX_OPTION} --sysroot=$SDKTARGETSYSROOT"' >> $script
13 echo 'export ICXAR="xiar ${ICXQSDK_PREFIX_OPTION}"' >> $script
14 fi
15}
diff --git a/recipes-core/meta/meta-environment-extsdk.bbappend b/recipes-core/meta/meta-environment-extsdk.bbappend
new file mode 100644
index 00000000..2cff6fc4
--- /dev/null
+++ b/recipes-core/meta/meta-environment-extsdk.bbappend
@@ -0,0 +1,3 @@
1FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
2
3require ${@bb.utils.contains('ICXSDK', '1', 'icx-environment.inc', '', d)}
diff --git a/recipes-core/meta/meta-environment.bbappend b/recipes-core/meta/meta-environment.bbappend
new file mode 100644
index 00000000..2cff6fc4
--- /dev/null
+++ b/recipes-core/meta/meta-environment.bbappend
@@ -0,0 +1,3 @@
1FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
2
3require ${@bb.utils.contains('ICXSDK', '1', 'icx-environment.inc', '', d)}
diff --git a/recipes-core/microcode/intel-microcode_20180312.bb b/recipes-core/microcode/intel-microcode_20240312.bb
index 238d09f3..00b18231 100644
--- a/recipes-core/microcode/intel-microcode_20180312.bb
+++ b/recipes-core/microcode/intel-microcode_20240312.bb
@@ -11,13 +11,15 @@ DESCRIPTION = "The microcode data file contains the latest microcode\
11 if the file is placed in the /etc/firmware directory of the Linux system." 11 if the file is placed in the /etc/firmware directory of the Linux system."
12 12
13LICENSE = "Intel-Microcode-License" 13LICENSE = "Intel-Microcode-License"
14LIC_FILES_CHKSUM = "file://microcode.dat;endline=33;md5=57d3c3c310f8debda2b0ca5baba67298" 14LIC_FILES_CHKSUM = "file://license;md5=d8405101ec6e90c1d84b082b0c40c721"
15
16SRC_URI = "git://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files.git;protocol=https;branch=main \
17 "
18
19SRCREV = "41af34500598418150aa298bb04e7edacc547897"
15 20
16SRC_URI = "https://downloadmirror.intel.com/27591/eng/microcode-${PV}.tgz"
17SRC_URI[md5sum] = "be315cd99a7ca392a2f917ceacbe14f2"
18SRC_URI[sha256sum] = "0b381face2df1b0a829dc4fa8fa93f47f39e11b1c9c22ebd44f8614657c1e779"
19DEPENDS = "iucode-tool-native" 21DEPENDS = "iucode-tool-native"
20S = "${WORKDIR}" 22S = "${WORKDIR}/git"
21 23
22COMPATIBLE_HOST = "(i.86|x86_64).*-linux" 24COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
23PACKAGE_ARCH = "${MACHINE_ARCH}" 25PACKAGE_ARCH = "${MACHINE_ARCH}"
@@ -29,30 +31,24 @@ inherit deploy
29UCODE_FILTER_PARAMETERS ?= "" 31UCODE_FILTER_PARAMETERS ?= ""
30 32
31do_compile() { 33do_compile() {
32 mkdir -p ${WORKDIR}/ucode/kernel/x86/microcode
33 ${STAGING_DIR_NATIVE}${sbindir_native}/iucode_tool \
34 ${UCODE_FILTER_PARAMETERS} \
35 --overwrite \
36 --write-to=${WORKDIR}/microcode_${PV}.bin \
37 ${WORKDIR}/microcode.dat
38
39 ${STAGING_DIR_NATIVE}${sbindir_native}/iucode_tool \ 34 ${STAGING_DIR_NATIVE}${sbindir_native}/iucode_tool \
40 ${UCODE_FILTER_PARAMETERS} \ 35 ${UCODE_FILTER_PARAMETERS} \
41 --overwrite \ 36 --overwrite \
42 --write-earlyfw=${WORKDIR}/microcode_${PV}.cpio \ 37 --write-earlyfw=${WORKDIR}/microcode_${PV}.cpio \
43 ${WORKDIR}/microcode.dat 38 ${S}/intel-ucode/* ${S}/intel-ucode-with-caveats/*
44} 39}
45 40
46do_install() { 41do_install() {
47 install -d ${D}${base_libdir}/firmware/intel-ucode/ 42 install -d ${D}${nonarch_base_libdir}/firmware/intel-ucode/
48 install ${WORKDIR}/microcode_${PV}.bin ${D}${base_libdir}/firmware/intel-ucode/ 43 ${STAGING_DIR_NATIVE}${sbindir_native}/iucode_tool \
49 cd ${D}${base_libdir}/firmware/intel-ucode/ 44 ${UCODE_FILTER_PARAMETERS} \
50 ln -sf microcode_${PV}.bin microcode.bin 45 --write-firmware=${D}${nonarch_base_libdir}/firmware/intel-ucode \
46 ${S}/intel-ucode/* ${S}/intel-ucode-with-caveats/*
51} 47}
52 48
53do_deploy() { 49do_deploy() {
54 install -d ${DEPLOYDIR} 50 install -d ${DEPLOYDIR}
55 install ${S}/microcode_${PV}.cpio ${DEPLOYDIR}/ 51 install ${WORKDIR}/microcode_${PV}.cpio ${DEPLOYDIR}/
56 cd ${DEPLOYDIR} 52 cd ${DEPLOYDIR}
57 rm -f microcode.cpio 53 rm -f microcode.cpio
58 ln -sf microcode_${PV}.cpio microcode.cpio 54 ln -sf microcode_${PV}.cpio microcode.cpio
@@ -62,4 +58,6 @@ addtask deploy before do_build after do_compile
62 58
63PACKAGES = "${PN}" 59PACKAGES = "${PN}"
64 60
65FILES_${PN} = "${base_libdir}" 61FILES:${PN} = "${nonarch_base_libdir}"
62
63UPSTREAM_CHECK_GITTAGREGEX = "^microcode-(?P<pver>(\d+)[a-z]*)$"
diff --git a/recipes-core/microcode/iucode-tool_2.1.2.bb b/recipes-core/microcode/iucode-tool_2.3.1.bb
index e1fb56f4..19417b7c 100644
--- a/recipes-core/microcode/iucode-tool_2.1.2.bb
+++ b/recipes-core/microcode/iucode-tool_2.3.1.bb
@@ -12,17 +12,17 @@ DESCRIPTION = "iucode_tool is a program to manipulate Intel i686 and X86-64\
12HOMEPAGE = "https://gitlab.com/iucode-tool/" 12HOMEPAGE = "https://gitlab.com/iucode-tool/"
13BUGTRACKER = "https://bugs.debian.org/cgi-bin/pkgreport.cgi?ordering=normal;archive=0;src=iucode-tool;repeatmerged=0" 13BUGTRACKER = "https://bugs.debian.org/cgi-bin/pkgreport.cgi?ordering=normal;archive=0;src=iucode-tool;repeatmerged=0"
14 14
15LICENSE = "GPLv2+" 15LICENSE = "GPL-2.0-or-later"
16LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ 16LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
17 file://iucode_tool.c;beginline=1;endline=15;md5=5d8e3639c3b6a80e7d5e0e073933da16" 17 file://iucode_tool.c;beginline=1;endline=15;md5=71eeab3190360ff0267101b570874756"
18 18
19DEPENDS_append_libc-musl = " argp-standalone" 19DEPENDS:append:libc-musl = " argp-standalone"
20 20
21SRC_URI = "https://gitlab.com/iucode-tool/releases/raw/master/iucode-tool_${PV}.tar.xz" 21SRC_URI = "https://gitlab.com/iucode-tool/releases/raw/master/iucode-tool_${PV}.tar.xz"
22SRC_URI_append_libc-musl = " file://0001-Makefile.am-Add-arg-parse-library-for-MUSL-support.patch" 22SRC_URI:append:libc-musl = " file://0001-Makefile.am-Add-arg-parse-library-for-MUSL-support.patch"
23 23
24SRC_URI[md5sum] = "c6f131a0b69443f5498782a2335973fa" 24SRC_URI[md5sum] = "63b33cc0ea1f8c73b443412abbf39d6f"
25SRC_URI[sha256sum] = "01f1c02ba6935e0ac8440fb594c2ef57ce4437fcbce539e3ef329f55a6fd71ab" 25SRC_URI[sha256sum] = "12b88efa4d0d95af08db05a50b3dcb217c0eb2bfc67b483779e33d498ddb2f95"
26 26
27inherit autotools 27inherit autotools
28 28
diff --git a/recipes-core/ovmf/files/0001-ovmf-RefkitTestCA-TEST-UEFI-SecureBoot.patch b/recipes-core/ovmf/files/0001-ovmf-RefkitTestCA-TEST-UEFI-SecureBoot.patch
index 62db0633..7eb3bc69 100644
--- a/recipes-core/ovmf/files/0001-ovmf-RefkitTestCA-TEST-UEFI-SecureBoot.patch
+++ b/recipes-core/ovmf/files/0001-ovmf-RefkitTestCA-TEST-UEFI-SecureBoot.patch
@@ -1,6 +1,6 @@
1From 48e511481d83c1614cd00a5a2edcf6b5d746b9c4 Mon Sep 17 00:00:00 2001 1From b2099e7184d48a6d05c8713b6fd5dac0e2e70963 Mon Sep 17 00:00:00 2001
2From: Mikko Ylinen <mikko.ylinen@linux.intel.com> 2From: Mikko Ylinen <mikko.ylinen@linux.intel.com>
3Date: Fri, 7 Apr 2017 12:06:14 +0300 3Date: Wed, 2 Mar 2022 10:55:35 +0800
4Subject: [PATCH] ovmf: RefkitTestCA: TEST UEFI SecureBoot 4Subject: [PATCH] ovmf: RefkitTestCA: TEST UEFI SecureBoot
5 5
6This patch adds refkit-db.cer (via xxd -i) in OVMF's db 6This patch adds refkit-db.cer (via xxd -i) in OVMF's db
@@ -9,97 +9,121 @@ application. It's used for testing purposes only.
9 9
10Images signed with refkit-db keys are allowed to boot. 10Images signed with refkit-db keys are allowed to boot.
11 11
12Upstream-Status: Inappropriate
13
12Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com> 14Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com>
15Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
13--- 16---
14 OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c | 68 +++++++++++++++++++++++++++ 17 OvmfPkg/EnrollDefaultKeys/AuthData.c | 69 +++++++++++++++++++
15 1 file changed, 68 insertions(+) 18 OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c | 3 +
19 OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.h | 2 +
20 3 files changed, 74 insertions(+)
16 21
22diff --git a/OvmfPkg/EnrollDefaultKeys/AuthData.c b/OvmfPkg/EnrollDefaultKeys/AuthData.c
23index 53ee7f7003..127131cd05 100644
24--- a/OvmfPkg/EnrollDefaultKeys/AuthData.c
25+++ b/OvmfPkg/EnrollDefaultKeys/AuthData.c
26@@ -395,6 +395,75 @@ CONST UINT8 mMicrosoftUefiCa[] = {
27
28 CONST UINTN mSizeOfMicrosoftUefiCa = sizeof mMicrosoftUefiCa;
29
30+CONST UINT8 mRefkitTestCA[] = {
31+ 0x30, 0x82, 0x02, 0xfb, 0x30, 0x82, 0x01, 0xe3, 0xa0, 0x03, 0x02, 0x01,
32+ 0x02, 0x02, 0x09, 0x00, 0xd4, 0xf6, 0x48, 0xc2, 0x68, 0x19, 0x91, 0xac,
33+ 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01,
34+ 0x0b, 0x05, 0x00, 0x30, 0x14, 0x31, 0x12, 0x30, 0x10, 0x06, 0x03, 0x55,
35+ 0x04, 0x03, 0x0c, 0x09, 0x72, 0x65, 0x66, 0x6b, 0x69, 0x74, 0x2d, 0x64,
36+ 0x62, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x37, 0x30, 0x34, 0x32, 0x30, 0x31,
37+ 0x32, 0x30, 0x36, 0x33, 0x32, 0x5a, 0x17, 0x0d, 0x31, 0x38, 0x30, 0x34,
38+ 0x32, 0x30, 0x31, 0x32, 0x30, 0x36, 0x33, 0x32, 0x5a, 0x30, 0x14, 0x31,
39+ 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x09, 0x72, 0x65,
40+ 0x66, 0x6b, 0x69, 0x74, 0x2d, 0x64, 0x62, 0x30, 0x82, 0x01, 0x22, 0x30,
41+ 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
42+ 0x05, 0x00, 0x03, 0x82, 0x01, 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02,
43+ 0x82, 0x01, 0x01, 0x00, 0xb4, 0x1c, 0x22, 0xa6, 0x22, 0x01, 0x57, 0xcd,
44+ 0xf1, 0x4f, 0xaf, 0x72, 0xe3, 0xd9, 0x01, 0x80, 0x50, 0x55, 0xef, 0x02,
45+ 0x5e, 0xeb, 0x99, 0x35, 0xcb, 0x7f, 0x2a, 0x79, 0xff, 0xb5, 0x3e, 0xec,
46+ 0x5d, 0x92, 0x06, 0x30, 0x20, 0xe7, 0x95, 0xad, 0xa4, 0x84, 0x2e, 0x3f,
47+ 0xfa, 0xd7, 0x46, 0xdd, 0x49, 0xa8, 0xe8, 0xe3, 0x79, 0x49, 0xf6, 0x8f,
48+ 0x0b, 0x1d, 0xfe, 0x63, 0xa8, 0xd1, 0x63, 0xa3, 0xd6, 0x0d, 0x4e, 0x6c,
49+ 0x66, 0x5c, 0xd6, 0x66, 0x26, 0xd1, 0x26, 0x98, 0xd4, 0x4f, 0x76, 0xc9,
50+ 0x65, 0x48, 0x58, 0x13, 0x08, 0x31, 0xbc, 0xe5, 0x47, 0x25, 0x65, 0x95,
51+ 0x39, 0x89, 0x5f, 0x02, 0xf1, 0xc5, 0x06, 0x17, 0x58, 0xca, 0x09, 0xfd,
52+ 0xf6, 0x1e, 0xc5, 0x97, 0xda, 0xa3, 0x4e, 0x1a, 0x48, 0xbe, 0xcf, 0x96,
53+ 0x27, 0x04, 0x4b, 0xb7, 0x6d, 0x67, 0xb6, 0x50, 0x18, 0x04, 0x73, 0x51,
54+ 0xd2, 0x6a, 0x2d, 0xdf, 0x3b, 0xab, 0xf2, 0x2d, 0x95, 0xd7, 0xa8, 0xb8,
55+ 0xa8, 0x30, 0xa1, 0xab, 0x8b, 0x92, 0x2b, 0x60, 0x3e, 0x3a, 0xe5, 0x86,
56+ 0x40, 0x71, 0xc1, 0x3f, 0x2d, 0x2e, 0x90, 0xe7, 0xd6, 0xec, 0xcc, 0xc2,
57+ 0x0b, 0x79, 0x83, 0x71, 0x6d, 0xf6, 0xa3, 0xa9, 0x4c, 0xcd, 0x46, 0x81,
58+ 0xdc, 0xef, 0xec, 0x51, 0xbe, 0x81, 0x2a, 0xf1, 0x78, 0x73, 0x41, 0xdb,
59+ 0x54, 0xce, 0x7c, 0xce, 0xa2, 0xe3, 0x90, 0x4f, 0x45, 0x1a, 0xf9, 0x3d,
60+ 0x88, 0xfc, 0x0e, 0xed, 0xd3, 0x69, 0x22, 0x4c, 0xfa, 0x0a, 0x69, 0xd1,
61+ 0x48, 0xc0, 0xaa, 0xa9, 0x3a, 0xb3, 0x8f, 0x10, 0x3a, 0x76, 0xa8, 0x0c,
62+ 0x7a, 0x3d, 0xd8, 0x79, 0xce, 0x1c, 0x96, 0x62, 0xf4, 0x06, 0xee, 0x47,
63+ 0xe8, 0xe0, 0x69, 0x91, 0xae, 0xea, 0x34, 0xcf, 0xda, 0xa8, 0xb4, 0x39,
64+ 0x5e, 0xf3, 0x7a, 0xd0, 0x88, 0x48, 0x47, 0x69, 0x02, 0x03, 0x01, 0x00,
65+ 0x01, 0xa3, 0x50, 0x30, 0x4e, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e,
66+ 0x04, 0x16, 0x04, 0x14, 0x68, 0x60, 0x11, 0x25, 0x85, 0x14, 0x78, 0x1b,
67+ 0x1a, 0x9f, 0x46, 0x12, 0xe6, 0x21, 0xe4, 0xef, 0xfb, 0x3b, 0xaa, 0xdd,
68+ 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80,
69+ 0x14, 0x68, 0x60, 0x11, 0x25, 0x85, 0x14, 0x78, 0x1b, 0x1a, 0x9f, 0x46,
70+ 0x12, 0xe6, 0x21, 0xe4, 0xef, 0xfb, 0x3b, 0xaa, 0xdd, 0x30, 0x0c, 0x06,
71+ 0x03, 0x55, 0x1d, 0x13, 0x04, 0x05, 0x30, 0x03, 0x01, 0x01, 0xff, 0x30,
72+ 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b,
73+ 0x05, 0x00, 0x03, 0x82, 0x01, 0x01, 0x00, 0x8f, 0xd2, 0x84, 0x7c, 0x43,
74+ 0x47, 0xca, 0x6b, 0xfd, 0x87, 0x83, 0xd0, 0xef, 0x75, 0xd3, 0x20, 0x52,
75+ 0x73, 0x18, 0xaa, 0x32, 0x71, 0xfb, 0xa5, 0xf4, 0xc9, 0x11, 0xa3, 0x68,
76+ 0x4d, 0xb7, 0x9d, 0xe6, 0xd9, 0x46, 0x24, 0xdc, 0xc7, 0xc2, 0x3b, 0xf9,
77+ 0xb0, 0x98, 0xfc, 0xee, 0x34, 0x6e, 0x10, 0x9b, 0x3d, 0x44, 0x6e, 0x33,
78+ 0x09, 0x11, 0xb8, 0x29, 0xd6, 0x2d, 0x06, 0xcf, 0x67, 0x8f, 0x96, 0x85,
79+ 0x9d, 0x63, 0x72, 0xbf, 0x64, 0x5f, 0x0d, 0xe3, 0xc9, 0x63, 0x19, 0x71,
80+ 0xd4, 0x7d, 0x4c, 0x9c, 0x77, 0x46, 0xda, 0x20, 0x97, 0x6d, 0xbc, 0xdd,
81+ 0xc2, 0x1f, 0xf3, 0x40, 0x38, 0x1e, 0xe7, 0xcc, 0x55, 0x05, 0x72, 0xba,
82+ 0x24, 0x4f, 0xb3, 0x8a, 0x93, 0x0c, 0x30, 0x60, 0xda, 0x9f, 0x6f, 0x35,
83+ 0xf6, 0xfb, 0xb0, 0x1f, 0xb3, 0x00, 0xdd, 0xc4, 0xa6, 0xbc, 0xe2, 0x37,
84+ 0xc1, 0xa3, 0xef, 0xd9, 0xa1, 0x86, 0xf9, 0xeb, 0xa4, 0xa5, 0x45, 0x38,
85+ 0xff, 0x4e, 0x87, 0x4a, 0x41, 0xcf, 0x6e, 0x69, 0x7e, 0x97, 0xbe, 0x2d,
86+ 0x22, 0xbc, 0x8d, 0xa0, 0x1a, 0x21, 0x8f, 0x4b, 0x72, 0x90, 0x01, 0x5c,
87+ 0xba, 0xa5, 0x9c, 0x2d, 0xd7, 0x25, 0x24, 0xfc, 0xff, 0x5c, 0x58, 0x14,
88+ 0x46, 0x30, 0x09, 0x7c, 0x55, 0x64, 0x83, 0x0b, 0xb9, 0xdf, 0xcf, 0x25,
89+ 0xee, 0xec, 0xf7, 0xcb, 0xdb, 0xd1, 0x5b, 0x93, 0x93, 0xc8, 0x8a, 0x10,
90+ 0x46, 0xb8, 0xb0, 0x35, 0x1c, 0x6c, 0x0d, 0x8f, 0x03, 0x6a, 0x8f, 0x1b,
91+ 0x36, 0x68, 0xf3, 0x53, 0x89, 0x36, 0x5b, 0x21, 0x80, 0xde, 0xe3, 0x92,
92+ 0x52, 0x94, 0x97, 0x9d, 0x49, 0x89, 0x7d, 0x3e, 0xde, 0x29, 0x51, 0xba,
93+ 0x11, 0xf7, 0xba, 0x01, 0xf7, 0xab, 0xea, 0xc1, 0xa7, 0x2e, 0xa3, 0x4d,
94+ 0x65, 0xfd, 0x40, 0x71, 0xf1, 0xe2, 0x3f, 0x6c, 0x28, 0xcb, 0xd3
95+};
96+
97+CONST UINTN mSizeOfRefkitTestCA = sizeof mRefkitTestCA;
98+
99 //
100 // The Microsoft.UefiSecureBootLogo.Tests.OutOfBoxConfirmDBXisPresent test case
101 // of the Secure Boot Logo Test in the Microsoft Hardware Certification Kit
17diff --git a/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c b/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c 102diff --git a/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c b/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c
18index 24ab977..a3c12ba 100644 103index 094e4c821b..0a7eef54dc 100644
19--- a/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c 104--- a/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c
20+++ b/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c 105+++ b/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c
21@@ -516,6 +516,73 @@ STATIC CONST UINT8 MicrosoftUefiCA[] = { 106@@ -702,6 +702,9 @@ ShellAppMain (
22 0x07, 0x92, 0x9b, 0xf5, 0xa6, 0xbc, 0x59, 0x83, 0x58 107 mMicrosoftUefiCa,
23 }; 108 mSizeOfMicrosoftUefiCa,
24 109 &gMicrosoftVendorGuid,
25+STATIC CONST UINT8 RefkitTestCA[] = { 110+ mRefkitTestCA,
26+ 0x30, 0x82, 0x02, 0xfb, 0x30, 0x82, 0x01, 0xe3, 0xa0, 0x03, 0x02, 0x01, 111+ mSizeOfRefkitTestCA,
27+ 0x02, 0x02, 0x09, 0x00, 0xd4, 0xf6, 0x48, 0xc2, 0x68, 0x19, 0x91, 0xac, 112+ &gEfiCallerIdGuid,
28+ 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 113 NULL
29+ 0x0b, 0x05, 0x00, 0x30, 0x14, 0x31, 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, 114 );
30+ 0x04, 0x03, 0x0c, 0x09, 0x72, 0x65, 0x66, 0x6b, 0x69, 0x74, 0x2d, 0x64, 115 }
31+ 0x62, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x37, 0x30, 0x34, 0x32, 0x30, 0x31, 116diff --git a/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.h b/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.h
32+ 0x32, 0x30, 0x36, 0x33, 0x32, 0x5a, 0x17, 0x0d, 0x31, 0x38, 0x30, 0x34, 117index 56da9c71d6..8de1dfe4e0 100644
33+ 0x32, 0x30, 0x31, 0x32, 0x30, 0x36, 0x33, 0x32, 0x5a, 0x30, 0x14, 0x31, 118--- a/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.h
34+ 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x09, 0x72, 0x65, 119+++ b/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.h
35+ 0x66, 0x6b, 0x69, 0x74, 0x2d, 0x64, 0x62, 0x30, 0x82, 0x01, 0x22, 0x30, 120@@ -133,4 +133,6 @@ extern CONST UINTN mSizeOfMicrosoftUefiCa;
36+ 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 121 extern CONST UINT8 mSha256OfDevNull[];
37+ 0x05, 0x00, 0x03, 0x82, 0x01, 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, 122 extern CONST UINTN mSizeOfSha256OfDevNull;
38+ 0x82, 0x01, 0x01, 0x00, 0xb4, 0x1c, 0x22, 0xa6, 0x22, 0x01, 0x57, 0xcd, 123
39+ 0xf1, 0x4f, 0xaf, 0x72, 0xe3, 0xd9, 0x01, 0x80, 0x50, 0x55, 0xef, 0x02, 124+extern CONST UINT8 mRefkitTestCA[];
40+ 0x5e, 0xeb, 0x99, 0x35, 0xcb, 0x7f, 0x2a, 0x79, 0xff, 0xb5, 0x3e, 0xec, 125+extern CONST UINTN mSizeOfRefkitTestCA;
41+ 0x5d, 0x92, 0x06, 0x30, 0x20, 0xe7, 0x95, 0xad, 0xa4, 0x84, 0x2e, 0x3f, 126 #endif /* ENROLL_DEFAULT_KEYS_H_ */
42+ 0xfa, 0xd7, 0x46, 0xdd, 0x49, 0xa8, 0xe8, 0xe3, 0x79, 0x49, 0xf6, 0x8f,
43+ 0x0b, 0x1d, 0xfe, 0x63, 0xa8, 0xd1, 0x63, 0xa3, 0xd6, 0x0d, 0x4e, 0x6c,
44+ 0x66, 0x5c, 0xd6, 0x66, 0x26, 0xd1, 0x26, 0x98, 0xd4, 0x4f, 0x76, 0xc9,
45+ 0x65, 0x48, 0x58, 0x13, 0x08, 0x31, 0xbc, 0xe5, 0x47, 0x25, 0x65, 0x95,
46+ 0x39, 0x89, 0x5f, 0x02, 0xf1, 0xc5, 0x06, 0x17, 0x58, 0xca, 0x09, 0xfd,
47+ 0xf6, 0x1e, 0xc5, 0x97, 0xda, 0xa3, 0x4e, 0x1a, 0x48, 0xbe, 0xcf, 0x96,
48+ 0x27, 0x04, 0x4b, 0xb7, 0x6d, 0x67, 0xb6, 0x50, 0x18, 0x04, 0x73, 0x51,
49+ 0xd2, 0x6a, 0x2d, 0xdf, 0x3b, 0xab, 0xf2, 0x2d, 0x95, 0xd7, 0xa8, 0xb8,
50+ 0xa8, 0x30, 0xa1, 0xab, 0x8b, 0x92, 0x2b, 0x60, 0x3e, 0x3a, 0xe5, 0x86,
51+ 0x40, 0x71, 0xc1, 0x3f, 0x2d, 0x2e, 0x90, 0xe7, 0xd6, 0xec, 0xcc, 0xc2,
52+ 0x0b, 0x79, 0x83, 0x71, 0x6d, 0xf6, 0xa3, 0xa9, 0x4c, 0xcd, 0x46, 0x81,
53+ 0xdc, 0xef, 0xec, 0x51, 0xbe, 0x81, 0x2a, 0xf1, 0x78, 0x73, 0x41, 0xdb,
54+ 0x54, 0xce, 0x7c, 0xce, 0xa2, 0xe3, 0x90, 0x4f, 0x45, 0x1a, 0xf9, 0x3d,
55+ 0x88, 0xfc, 0x0e, 0xed, 0xd3, 0x69, 0x22, 0x4c, 0xfa, 0x0a, 0x69, 0xd1,
56+ 0x48, 0xc0, 0xaa, 0xa9, 0x3a, 0xb3, 0x8f, 0x10, 0x3a, 0x76, 0xa8, 0x0c,
57+ 0x7a, 0x3d, 0xd8, 0x79, 0xce, 0x1c, 0x96, 0x62, 0xf4, 0x06, 0xee, 0x47,
58+ 0xe8, 0xe0, 0x69, 0x91, 0xae, 0xea, 0x34, 0xcf, 0xda, 0xa8, 0xb4, 0x39,
59+ 0x5e, 0xf3, 0x7a, 0xd0, 0x88, 0x48, 0x47, 0x69, 0x02, 0x03, 0x01, 0x00,
60+ 0x01, 0xa3, 0x50, 0x30, 0x4e, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e,
61+ 0x04, 0x16, 0x04, 0x14, 0x68, 0x60, 0x11, 0x25, 0x85, 0x14, 0x78, 0x1b,
62+ 0x1a, 0x9f, 0x46, 0x12, 0xe6, 0x21, 0xe4, 0xef, 0xfb, 0x3b, 0xaa, 0xdd,
63+ 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80,
64+ 0x14, 0x68, 0x60, 0x11, 0x25, 0x85, 0x14, 0x78, 0x1b, 0x1a, 0x9f, 0x46,
65+ 0x12, 0xe6, 0x21, 0xe4, 0xef, 0xfb, 0x3b, 0xaa, 0xdd, 0x30, 0x0c, 0x06,
66+ 0x03, 0x55, 0x1d, 0x13, 0x04, 0x05, 0x30, 0x03, 0x01, 0x01, 0xff, 0x30,
67+ 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b,
68+ 0x05, 0x00, 0x03, 0x82, 0x01, 0x01, 0x00, 0x8f, 0xd2, 0x84, 0x7c, 0x43,
69+ 0x47, 0xca, 0x6b, 0xfd, 0x87, 0x83, 0xd0, 0xef, 0x75, 0xd3, 0x20, 0x52,
70+ 0x73, 0x18, 0xaa, 0x32, 0x71, 0xfb, 0xa5, 0xf4, 0xc9, 0x11, 0xa3, 0x68,
71+ 0x4d, 0xb7, 0x9d, 0xe6, 0xd9, 0x46, 0x24, 0xdc, 0xc7, 0xc2, 0x3b, 0xf9,
72+ 0xb0, 0x98, 0xfc, 0xee, 0x34, 0x6e, 0x10, 0x9b, 0x3d, 0x44, 0x6e, 0x33,
73+ 0x09, 0x11, 0xb8, 0x29, 0xd6, 0x2d, 0x06, 0xcf, 0x67, 0x8f, 0x96, 0x85,
74+ 0x9d, 0x63, 0x72, 0xbf, 0x64, 0x5f, 0x0d, 0xe3, 0xc9, 0x63, 0x19, 0x71,
75+ 0xd4, 0x7d, 0x4c, 0x9c, 0x77, 0x46, 0xda, 0x20, 0x97, 0x6d, 0xbc, 0xdd,
76+ 0xc2, 0x1f, 0xf3, 0x40, 0x38, 0x1e, 0xe7, 0xcc, 0x55, 0x05, 0x72, 0xba,
77+ 0x24, 0x4f, 0xb3, 0x8a, 0x93, 0x0c, 0x30, 0x60, 0xda, 0x9f, 0x6f, 0x35,
78+ 0xf6, 0xfb, 0xb0, 0x1f, 0xb3, 0x00, 0xdd, 0xc4, 0xa6, 0xbc, 0xe2, 0x37,
79+ 0xc1, 0xa3, 0xef, 0xd9, 0xa1, 0x86, 0xf9, 0xeb, 0xa4, 0xa5, 0x45, 0x38,
80+ 0xff, 0x4e, 0x87, 0x4a, 0x41, 0xcf, 0x6e, 0x69, 0x7e, 0x97, 0xbe, 0x2d,
81+ 0x22, 0xbc, 0x8d, 0xa0, 0x1a, 0x21, 0x8f, 0x4b, 0x72, 0x90, 0x01, 0x5c,
82+ 0xba, 0xa5, 0x9c, 0x2d, 0xd7, 0x25, 0x24, 0xfc, 0xff, 0x5c, 0x58, 0x14,
83+ 0x46, 0x30, 0x09, 0x7c, 0x55, 0x64, 0x83, 0x0b, 0xb9, 0xdf, 0xcf, 0x25,
84+ 0xee, 0xec, 0xf7, 0xcb, 0xdb, 0xd1, 0x5b, 0x93, 0x93, 0xc8, 0x8a, 0x10,
85+ 0x46, 0xb8, 0xb0, 0x35, 0x1c, 0x6c, 0x0d, 0x8f, 0x03, 0x6a, 0x8f, 0x1b,
86+ 0x36, 0x68, 0xf3, 0x53, 0x89, 0x36, 0x5b, 0x21, 0x80, 0xde, 0xe3, 0x92,
87+ 0x52, 0x94, 0x97, 0x9d, 0x49, 0x89, 0x7d, 0x3e, 0xde, 0x29, 0x51, 0xba,
88+ 0x11, 0xf7, 0xba, 0x01, 0xf7, 0xab, 0xea, 0xc1, 0xa7, 0x2e, 0xa3, 0x4d,
89+ 0x65, 0xfd, 0x40, 0x71, 0xf1, 0xe2, 0x3f, 0x6c, 0x28, 0xcb, 0xd3
90+};
91+
92 //
93 // The most important thing about the variable payload is that it is a list of
94 // lists, where the element size of any given *inner* list is constant.
95@@ -908,6 +975,7 @@ ShellAppMain (
96 &gEfiImageSecurityDatabaseGuid,
97 MicrosoftPCA, sizeof MicrosoftPCA, &gEfiCallerIdGuid,
98 MicrosoftUefiCA, sizeof MicrosoftUefiCA, &gEfiCallerIdGuid,
99+ RefkitTestCA, sizeof RefkitTestCA, &gEfiCallerIdGuid,
100 NULL);
101 if (EFI_ERROR (Status)) {
102 return 1;
103-- 127--
1042.1.4 1282.17.1
105 129
diff --git a/recipes-core/ovmf/ovmf-shell-image-enrollkeys.bb b/recipes-core/ovmf/ovmf-shell-image-enrollkeys.bb
index b20f6e58..ca3cfc15 100644
--- a/recipes-core/ovmf/ovmf-shell-image-enrollkeys.bb
+++ b/recipes-core/ovmf/ovmf-shell-image-enrollkeys.bb
@@ -1,10 +1,10 @@
1require recipes-core/ovmf/ovmf-shell-image.bb 1require recipes-core/ovmf/ovmf-shell-image.bb
2 2
3WKS_SEARCH_PATH_append = ":${COREBASE}/meta/recipes-core/ovmf" 3WKS_SEARCH_PATH:append = ":${COREBASE}/meta/recipes-core/ovmf"
4 4
5QB_DRIVE_TYPE = "/dev/vd" 5QB_DRIVE_TYPE = "/dev/vd"
6 6
7do_image_append() { 7do_image:append() {
8 cat > ${IMAGE_ROOTFS}/startup.nsh << EOF 8 cat > ${IMAGE_ROOTFS}/startup.nsh << EOF
9EnrollDefaultKeys 9EnrollDefaultKeys
10reset 10reset
diff --git a/recipes-core/ovmf/ovmf_%.bbappend b/recipes-core/ovmf/ovmf_%.bbappend
index bbf5fa32..34a9dd1b 100644
--- a/recipes-core/ovmf/ovmf_%.bbappend
+++ b/recipes-core/ovmf/ovmf_%.bbappend
@@ -1,6 +1,6 @@
1FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/files:" 1FILESEXTRAPATHS:prepend:intel-x86-common := "${THISDIR}/files:"
2 2
3SRC_URI_append_intel-x86-common = " \ 3SRC_URI:append:intel-x86-common = " \
4 file://0001-ovmf-RefkitTestCA-TEST-UEFI-SecureBoot.patch \ 4 file://0001-ovmf-RefkitTestCA-TEST-UEFI-SecureBoot.patch \
5" 5"
6PACKAGECONFIG_append_intel-x86-common = " secureboot" 6PACKAGECONFIG:append:intel-x86-common = " secureboot"
diff --git a/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
new file mode 100644
index 00000000..b5a5fdd4
--- /dev/null
+++ b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
@@ -0,0 +1 @@
RDEPENDS:${PN} += "${@bb.utils.contains('ICXSDK', '1', ' intel-oneapi-dpcpp-cpp intel-oneapi-dpcpp-cpp-dev intel-oneapi-dpcpp-cpp-runtime intel-oneapi-dpcpp-cpp-runtime-dev ', '', d)}"
diff --git a/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bbappend b/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bbappend
new file mode 100644
index 00000000..608ea3d3
--- /dev/null
+++ b/recipes-core/packagegroups/packagegroup-core-standalone-sdk-target.bbappend
@@ -0,0 +1 @@
RRECOMMENDS:${PN}:append:intel-x86-common = "${@bb.utils.contains('ICXSDK', '1', ' intel-oneapi-dpcpp-cpp intel-oneapi-dpcpp-cpp-dev intel-oneapi-dpcpp-cpp-runtime intel-oneapi-dpcpp-cpp-runtime-dev ', '', d)}"
diff --git a/recipes-devtools/slimboot/slimboot-tools_git.bb b/recipes-devtools/slimboot/slimboot-tools_git.bb
new file mode 100644
index 00000000..b65b182d
--- /dev/null
+++ b/recipes-devtools/slimboot/slimboot-tools_git.bb
@@ -0,0 +1,22 @@
1SUMMARY = "Slim Bootloader Host Tools"
2DESCRIPTION = "Native host tools to generate the container images in a \
3binary file format understood by Slim Bootloader to load and initialize\
4Operating Systems or Hypervisors."
5HOMEPAGE = "https://slimbootloader.github.io/tools/index.html"
6
7SRC_URI = "git://github.com/slimbootloader/slimbootloader;protocol=https;branch=master"
8SRCREV = "df5bd0bc2a522afcb8945a6797592b04838db753"
9PV = "0.0.0+git${SRCPV}"
10LICENSE = "BSD-2-Clause-Patent"
11LIC_FILES_CHKSUM = "file://LICENSE;md5=ef7fba7be2819ac13aaf5d0f842ce5d9"
12S = "${WORKDIR}/git"
13
14inherit python3native
15BBCLASSEXTEND = "native"
16
17do_configure[noexec] = "1"
18do_compile[noexec] = "1"
19do_install() {
20 install -m 755 -d ${D}${libexecdir}/slimboot/Tools
21 install -m 755 ${S}/BootloaderCorePkg/Tools/*.py ${D}${libexecdir}/slimboot/Tools
22}
diff --git a/recipes-graphics/gmmlib/files/0001-Add-new-DG2-device-IDs-194.patch b/recipes-graphics/gmmlib/files/0001-Add-new-DG2-device-IDs-194.patch
new file mode 100644
index 00000000..825c1f18
--- /dev/null
+++ b/recipes-graphics/gmmlib/files/0001-Add-new-DG2-device-IDs-194.patch
@@ -0,0 +1,37 @@
1From 8729d66800995a9b7e693bd78249932bd12383e1 Mon Sep 17 00:00:00 2001
2From: John Machado <john.machado@intel.com>
3Date: Mon, 25 Mar 2024 11:13:27 +0530
4Subject: [PATCH] Add new DG2 device IDs (#194)
5
6Upstream-Status: Backport [https://github.com/intel/gmmlib/commit/dcc4b85ea3728c848b62fbb164c00f43b519b6fb]
7
8Signed-off-by: Hoe, Sheng Yang <sheng.yang.hoe@intel.com>
9---
10 Source/inc/common/igfxfmid.h | 4 ++++
11 1 file changed, 4 insertions(+)
12
13diff --git a/Source/inc/common/igfxfmid.h b/Source/inc/common/igfxfmid.h
14index 7969779..8e2c955 100644
15--- a/Source/inc/common/igfxfmid.h
16+++ b/Source/inc/common/igfxfmid.h
17@@ -1932,6 +1932,8 @@ typedef enum __NATIVEGTTYPE
18 #define DEV_ID_56BB 0x56BB
19 #define DEV_ID_56BC 0x56BC
20 #define DEV_ID_56BD 0x56BD
21+#define DEV_ID_56BE 0x56BE
22+#define DEV_ID_56BF 0x56BF
23 #define DEV_ID_56C0 0x56C0
24 #define DEV_ID_56C1 0x56C1
25
26@@ -1992,6 +1994,8 @@ typedef enum __NATIVEGTTYPE
27 ( d == DEV_ID_5690 ) || \
28 ( d == DEV_ID_5691 ) || \
29 ( d == DEV_ID_5692 ) || \
30+ ( d == DEV_ID_56BE ) || \
31+ ( d == DEV_ID_56BF ) || \
32 ( d == DEV_ID_56C0 ) || \
33 ( d == DEV_ID_4F80 ) || \
34 ( d == DEV_ID_4F81 ) || \
35--
362.34.1
37
diff --git a/recipes-graphics/gmmlib/files/0001-Introduce-ARL-H-support-172.patch b/recipes-graphics/gmmlib/files/0001-Introduce-ARL-H-support-172.patch
new file mode 100644
index 00000000..ab4cb178
--- /dev/null
+++ b/recipes-graphics/gmmlib/files/0001-Introduce-ARL-H-support-172.patch
@@ -0,0 +1,42 @@
1From 2b267b72d6aaa922861b120da9c1543161797046 Mon Sep 17 00:00:00 2001
2From: John Machado <john.machado@intel.com>
3Date: Fri, 9 Feb 2024 13:10:18 +0530
4Subject: [PATCH] Introduce ARL-H support (#172)
5
6Upstream-Status: Backport [https://github.com/intel/gmmlib/commit/544a8be6f66631e085c86c453aafd78b0e7f5179]
7Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
8---
9 Source/inc/common/igfxfmid.h | 10 ++++++++++
10 1 file changed, 10 insertions(+)
11
12diff --git a/Source/inc/common/igfxfmid.h b/Source/inc/common/igfxfmid.h
13index 99fc624..19aa505 100644
14--- a/Source/inc/common/igfxfmid.h
15+++ b/Source/inc/common/igfxfmid.h
16@@ -1966,6 +1966,11 @@ typedef enum __NATIVEGTTYPE
17 // ARL-S
18 #define DEV_ID_7D67 0x7D67
19
20+// ARL-H
21+#define DEV_ID_7D41 0x7D41
22+#define DEV_ID_7D51 0x7D51
23+#define DEV_ID_7DD1 0x7DD1
24+
25 #define MGM_HAS 0
26
27 //#define SDG_HAS 1 //Reserve place for Springdale-G HAS
28@@ -2012,6 +2017,11 @@ typedef enum __NATIVEGTTYPE
29 // Macro to identify ARL-S Device ID
30 #define GFX_IS_ARL_S(d) ( ( d == DEV_ID_7D67 ) )
31
32+// Macro to identify ARL-H Device ID
33+#define GFX_IS_ARL_H(d) ( ( d == DEV_ID_7D41 ) || \
34+ ( d == DEV_ID_7D51 ) || \
35+ ( d == DEV_ID_7DD1 ))
36+
37 //we define the highest cap and lower cap of stepping IDs
38 #define SI_REV_ID(lo,hi) (lo | hi<<16)
39
40--
412.40.1
42
diff --git a/recipes-graphics/gmmlib/gmmlib_22.3.15.bb b/recipes-graphics/gmmlib/gmmlib_22.3.15.bb
new file mode 100644
index 00000000..875fbaf5
--- /dev/null
+++ b/recipes-graphics/gmmlib/gmmlib_22.3.15.bb
@@ -0,0 +1,27 @@
1SUMMARY = "Intel(R) Graphics Memory Management Library"
2DESCRIPTION = "The Intel(R) Graphics Memory Management Library provides \
3device specific and buffer management for the Intel(R) Graphics \
4Compute Runtime for OpenCL(TM) and the Intel(R) Media Driver for VAAPI."
5
6LICENSE = "MIT"
7LIC_FILES_CHKSUM = "file://LICENSE.md;md5=465fe90caea3edd6a2cecb3f0c28a654"
8
9SRC_URI = " \
10 git://github.com/intel/gmmlib.git;protocol=https;branch=master \
11 file://0001-Introduce-ARL-H-support-172.patch \
12 file://0001-Add-new-DG2-device-IDs-194.patch \
13 "
14
15SRCREV = "5fb4180e22695ad4e3c155cf680119913c9f44bc"
16
17S = "${WORKDIR}/git"
18
19COMPATIBLE_HOST:x86-x32 = "null"
20
21UPSTREAM_CHECK_GITTAGREGEX = "^intel-gmmlib-(?P<pver>(\d+(\.\d+)+))$"
22
23inherit pkgconfig cmake
24
25EXTRA_OECMAKE += "-DRUN_TEST_SUITE=OFF"
26
27BBCLASSEXTEND = "native nativesdk"
diff --git a/recipes-graphics/hdcp/hdcp/0001-main-fix-hdcpd-service-failure.patch b/recipes-graphics/hdcp/hdcp/0001-main-fix-hdcpd-service-failure.patch
new file mode 100644
index 00000000..6d32da43
--- /dev/null
+++ b/recipes-graphics/hdcp/hdcp/0001-main-fix-hdcpd-service-failure.patch
@@ -0,0 +1,42 @@
1From 5cbcecff0bb7fa1c617d3082e7ad94c22e5f4eb1 Mon Sep 17 00:00:00 2001
2From: Naveen Saini <naveen.kumar.saini@intel.com>
3Date: Wed, 3 Jul 2019 17:13:15 +0800
4Subject: [PATCH] main: fix hdcpd service failure
5
6Child process not able to finish before parent process
7exits, which causing hdcpd service failure.
8
9Added wait function to block parent process
10until child process exits.
11
12Upstream-Status: Submitted [https://github.com/intel/hdcp/pull/17]
13
14Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
15---
16 daemon/main.cpp | 3 +++
17 1 file changed, 3 insertions(+)
18
19diff --git a/daemon/main.cpp b/daemon/main.cpp
20index 9a028d7..ef1e047 100644
21--- a/daemon/main.cpp
22+++ b/daemon/main.cpp
23@@ -36,6 +36,7 @@
24 #include <sys/ioctl.h>
25 #include <fcntl.h>
26 #include <iostream>
27+#include <sys/wait.h>
28
29 #include "hdcpdef.h"
30 #include "srm.h"
31@@ -93,6 +94,8 @@ int32_t daemon_init(void)
32 }
33 else if (pid != 0)
34 {
35+ int status;
36+ wait(&status);
37 exit(SUCCESS); // parent exit
38 }
39
40--
412.17.1
42
diff --git a/recipes-graphics/hdcp/hdcp_21.2.0.bb b/recipes-graphics/hdcp/hdcp_21.2.0.bb
new file mode 100644
index 00000000..8529b5ab
--- /dev/null
+++ b/recipes-graphics/hdcp/hdcp_21.2.0.bb
@@ -0,0 +1,26 @@
1SUMMARY = "Intel(R) unified HDCP SDK"
2DESCRIPTION = "This is a user space implementation to prevent copying of \
3digital audio & video content across digital display interfaces. It provides \
4Linux user space implementation to enable the HDCP1.4 and HDCP2.2 protection \
5for external digital display interface"
6LICENSE = "BSD-3-Clause"
7LIC_FILES_CHKSUM = "file://LICENSE.md;md5=c50969be4feb8b99c6baa3795ede4dce"
8SECTION = "lib"
9
10inherit pkgconfig cmake useradd systemd features_check
11
12SRC_URI = "git://github.com/intel/hdcp.git;branch=master;protocol=https \
13 file://0001-main-fix-hdcpd-service-failure.patch \
14"
15SRCREV = "cacc352159c5bdaf1c21846cecdd1eb7b031e1d3"
16S = "${WORKDIR}/git"
17
18REQUIRED_DISTRO_FEATURES = "systemd"
19
20DEPENDS = "libdrm virtual/mesa systemd"
21
22USERADD_PACKAGES = "${PN}"
23USERADD_PARAM:${PN} = "--system --no-create-home --shell /bin/false --gid nogroup media"
24
25SYSTEMD_SERVICE:${PN} = "hdcpd.service"
26SYSTEMD_AUTO_ENABLE = "disable"
diff --git a/recipes-graphics/intel-gpu-tools/intel-gpu-tools_1.22.bb b/recipes-graphics/intel-gpu-tools/intel-gpu-tools_1.22.bb
deleted file mode 100644
index f9ee7218..00000000
--- a/recipes-graphics/intel-gpu-tools/intel-gpu-tools_1.22.bb
+++ /dev/null
@@ -1,42 +0,0 @@
1require ${COREBASE}/meta/recipes-graphics/xorg-app/xorg-app-common.inc
2
3SUMMARY = "Intel GPU tools"
4DESCRIPTION = "Variety of small tools for testing intel graphics."
5
6LIC_FILES_CHKSUM = "file://COPYING;md5=e4b3dd344780e0400593b21b115a6947"
7
8LICENSE_append = " & ISC"
9
10inherit autotools gtk-doc
11
12SRC_URI = "${XORG_MIRROR}/individual/app/${BP}.tar.xz"
13
14DEPENDS += "libdrm libpciaccess cairo udev glib-2.0 libxv libx11 libxext libxrandr procps libunwind"
15RDEPENDS_${PN} += "bash"
16RDEPENDS_${PN}-tests += "bash"
17
18PACKAGE_BEFORE_PN = "${PN}-benchmarks ${PN}-tests"
19
20SRC_URI[md5sum] = "965c591b23a132084113c2a0604f537a"
21SRC_URI[sha256sum] = "3d66c1dc5110712ca4d22199b3ce9853f261be1690064edf87e69e5392e39a5c"
22
23EXTRA_OECONF = "--disable-nouveau --disable-shader-debugger"
24COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"
25COMPATIBLE_HOST_libc-musl_class-target = "null"
26
27PACKAGECONFIG ??= ""
28PACKAGECONFIG[audio] = "--enable-audio,--disable-audio,alsa-lib gsl"
29
30gputools_sysroot_preprocess() {
31 rm -f ${SYSROOT_DESTDIR}${libdir}/pkgconfig/intel-gen4asm.pc
32}
33SYSROOT_PREPROCESS_FUNCS += "gputools_sysroot_preprocess"
34
35FILES_${PN} += "${libdir}/intel_aubdump.so"
36FILES_${PN}-benchmarks += "${libexecdir}/intel-gpu-tools/benchmarks"
37FILES_${PN}-tests += "\
38 ${libexecdir}/intel-gpu-tools/*\
39 ${datadir}/intel-gpu-tools/1080p-right.png\
40 ${datadir}/intel-gpu-tools/1080p-left.png\
41 ${datadir}/intel-gpu-tools/pass.png\
42 ${datadir}/intel-gpu-tools/test-list.txt"
diff --git a/recipes-graphics/libva/libva-intel-utils_2.20.1.bb b/recipes-graphics/libva/libva-intel-utils_2.20.1.bb
new file mode 100644
index 00000000..9c26f009
--- /dev/null
+++ b/recipes-graphics/libva/libva-intel-utils_2.20.1.bb
@@ -0,0 +1,35 @@
1SUMMARY = "libva-utils is a collection of utilities from libva project"
2
3DESCRIPTION = "libva-utils is a collection of utilities \
4and examples to exercise VA-API in accordance with the libva \
5project.VA-API is an open-source library and API specification, \
6which provides access to graphics hardware acceleration capabilities \
7for video processing. It consists of a main library and driver-specific \
8acceleration backends for each supported hardware vendor"
9
10HOMEPAGE = "https://01.org/linuxmedia/vaapi"
11BUGTRACKER = "https://github.com/intel/libva-utils/issues"
12
13SECTION = "x11"
14LICENSE = "MIT"
15LIC_FILES_CHKSUM = "file://COPYING;md5=b148fc8adf19dc9aec17cf9cd29a9a5e"
16
17SRC_URI = "git://github.com/intel/libva-utils.git;branch=v2.20-branch;protocol=https"
18SRCREV = "2ad888bb463dc9bfb3deb512ec9faf78f1d3bfa8"
19S = "${WORKDIR}/git"
20
21UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
22
23DEPENDS = "libva"
24
25inherit meson pkgconfig features_check
26
27# depends on libva which requires opengl
28REQUIRED_DISTRO_FEATURES = "opengl"
29
30PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}"
31PACKAGECONFIG[x11] = "-Dx11=true, -Dx11=false,virtual/libx11 libxext libxfixes"
32PACKAGECONFIG[wayland] = "-Dwayland=true, -Dwayland=false,wayland-native wayland"
33
34PROVIDES = "libva-utils"
35RPROVIDES:${PN} += "libva-utils"
diff --git a/recipes-graphics/libva/libva-intel_2.20.0.bb b/recipes-graphics/libva/libva-intel_2.20.0.bb
new file mode 100644
index 00000000..c81ed65c
--- /dev/null
+++ b/recipes-graphics/libva/libva-intel_2.20.0.bb
@@ -0,0 +1,55 @@
1SUMMARY = "Video Acceleration (VA) API for Linux"
2DESCRIPTION = "Video Acceleration API (VA API) is a library (libVA) \
3and API specification which enables and provides access to graphics \
4hardware (GPU) acceleration for video processing on Linux and UNIX \
5based operating systems. Accelerated processing includes video \
6decoding, video encoding, subpicture blending and rendering. The \
7specification was originally designed by Intel for its GMA (Graphics \
8Media Accelerator) series of GPU hardware, the API is however not \
9limited to GPUs or Intel specific hardware, as other hardware and \
10manufacturers can also freely use this API for hardware accelerated \
11video decoding."
12
13HOMEPAGE = "https://01.org/linuxmedia/vaapi"
14BUGTRACKER = "https://github.com/intel/libva/issues"
15
16SECTION = "x11"
17LICENSE = "MIT"
18LIC_FILES_CHKSUM = "file://COPYING;md5=2e48940f94acb0af582e5ef03537800f"
19
20SRC_URI = "https://github.com/intel/libva/releases/download/${PV}/libva-${PV}.tar.bz2 \
21 "
22SRC_URI[sha256sum] = "f72bdb4f48dfe71ad01f1cbefe069672a2c949a6abd51cf3c4d4784210badc49"
23
24S = "${WORKDIR}/libva-${PV}"
25
26UPSTREAM_CHECK_URI = "https://github.com/intel/libva/releases"
27
28DEPENDS = "libdrm"
29
30inherit meson pkgconfig
31
32PACKAGECONFIG ??= " \
33 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'glx', '', d)} \
34 ${@bb.utils.filter('DISTRO_FEATURES', 'x11 wayland', d)} \
35"
36
37PACKAGECONFIG[x11] = "-Dwith_x11=yes,-Dwith_x11=no,virtual/libx11 libxext libxfixes"
38PACKAGECONFIG[glx] = "-Dwith_glx=yes,-Dwith_glx=no,virtual/mesa"
39
40PACKAGECONFIG[wayland] = "-Dwith_wayland=yes,-Dwith_wayland=no,wayland-native wayland"
41
42PACKAGES =+ "${PN}-x11 ${PN}-glx ${PN}-wayland"
43
44RDEPENDS:${PN}-x11 =+ "${PN}"
45RDEPENDS:${PN}-glx =+ "${PN}-x11"
46
47FILES:${PN}-x11 =+ "${libdir}/libva-x11*${SOLIBS}"
48FILES:${PN}-glx =+ "${libdir}/libva-glx*${SOLIBS}"
49FILES:${PN}-wayland =+ "${libdir}/libva-wayland*${SOLIBS}"
50
51PROVIDES += "libva"
52RPROVIDES:${PN} += "libva"
53RPROVIDES:${PN}-x11 += "libva-x11"
54RPROVIDES:${PN}-glx += "libva-glx"
55RPROVIDES:${PN}-wayland += "libva-wayland"
diff --git a/recipes-graphics/metrics-discovery/metrics-discovery_1.12.170.bb b/recipes-graphics/metrics-discovery/metrics-discovery_1.12.170.bb
new file mode 100644
index 00000000..3ed1c9bd
--- /dev/null
+++ b/recipes-graphics/metrics-discovery/metrics-discovery_1.12.170.bb
@@ -0,0 +1,18 @@
1SUMMARY = "Intel Metrics Discovery Application Programming Interface"
2DESCRIPTION = "This software is a user mode library that provides access to \
3GPU performance data."
4LICENSE = "MIT"
5LIC_FILES_CHKSUM = "file://LICENSE.md;md5=8c5c9ac8ffd04a5614befdf63fba6ba8"
6SECTION = "lib"
7
8inherit pkgconfig cmake
9
10S = "${WORKDIR}/git"
11SRCREV = "75b292eb1309e4ea10dce403065ee8ca5bf29ecc"
12SRC_URI = "git://github.com/intel/metrics-discovery.git;branch=master;protocol=https \
13 "
14
15EXTRA_OECMAKE += "-DMD_PLATFORM=linux"
16EXTRA_OECMAKE += "-DMD_LIBDRM_SRC=${STAGING_INCDIR}"
17
18DEPENDS = "libdrm"
diff --git a/recipes-graphics/xorg-driver/xf86-video-ast_1.1.5.bb b/recipes-graphics/xorg-driver/xf86-video-ast_1.1.6.bb
index 090efd62..d7e4eab4 100644
--- a/recipes-graphics/xorg-driver/xf86-video-ast_1.1.5.bb
+++ b/recipes-graphics/xorg-driver/xf86-video-ast_1.1.6.bb
@@ -7,6 +7,6 @@ DESCRIPTION = "ast is an Xorg driver for ASpeed Technologies video cards"
7LIC_FILES_CHKSUM = "file://COPYING;md5=0b8c242f0218eea5caa949b7910a774b" 7LIC_FILES_CHKSUM = "file://COPYING;md5=0b8c242f0218eea5caa949b7910a774b"
8 8
9DEPENDS += "libpciaccess" 9DEPENDS += "libpciaccess"
10XORG_DRIVER_COMPRESSOR = ".tar.gz"
10 11
11SRC_URI[md5sum] = "4f85febe48d51e53624550a96fc9e9ee" 12SRC_URI[sha256sum] = "eeff52178ce2916a0e07b531bb23c8b105826b6e6e6c5f7c90e33f757827a7c7"
12SRC_URI[sha256sum] = "1edbbc55d47d3fd71dec99b15c2483e22738c642623a0fb86ef4a81a9067a2de"
diff --git a/recipes-kernel/cryptodev/cryptodev-module/0001-zc-Force-4.10-get_user_pages_remote-API.patch b/recipes-kernel/cryptodev/cryptodev-module/0001-zc-Force-4.10-get_user_pages_remote-API.patch
deleted file mode 100644
index 353126fe..00000000
--- a/recipes-kernel/cryptodev/cryptodev-module/0001-zc-Force-4.10-get_user_pages_remote-API.patch
+++ /dev/null
@@ -1,26 +0,0 @@
1From 3fcc81ad127c267018aed96a359bbf01db1bd8ee Mon Sep 17 00:00:00 2001
2From: Saul Wold <sgw@linux.intel.com>
3Date: Sat, 1 Apr 2017 11:43:31 -0700
4Subject: [PATCH] zc: Force 4.10 get_user_pages_remote API
5
6This change forces the newer API, as the linux-intel 4.9-LTS kernel
7backported the 4.10 API change in the page handling code.
8
9Signed-off-by: Saul Wold <sgw@linux.intel.com>
10---
11 zc.c | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14diff --git a/zc.c b/zc.c
15index ae464ff..b2759ce 100644
16--- a/zc.c
17+++ b/zc.c
18@@ -65,7 +65,7 @@ int __get_userbuf(uint8_t __user *addr, uint32_t len, int write,
19 #elif (LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0))
20 ret = get_user_pages_remote(task, mm,
21 (unsigned long)addr, pgcount, write, 0, pg, NULL);
22-#elif (LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0))
23+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) & 0)
24 ret = get_user_pages_remote(task, mm,
25 (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
26 pg, NULL);
diff --git a/recipes-kernel/cryptodev/cryptodev-module_%.bbappend b/recipes-kernel/cryptodev/cryptodev-module_%.bbappend
deleted file mode 100644
index c59ddb2f..00000000
--- a/recipes-kernel/cryptodev/cryptodev-module_%.bbappend
+++ /dev/null
@@ -1,9 +0,0 @@
1FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:"
2
3python() {
4 # When we add more kernels for linux-intel, we may have to add a Version check
5 if (d.getVar("PREFERRED_PROVIDER_virtual/kernel") == "linux-intel"):
6 src_uri = d.getVar("SRC_URI")
7 d.setVar("SRC_URI", src_uri +
8 " file://0001-zc-Force-4.10-get_user_pages_remote-API.patch")
9}
diff --git a/recipes-kernel/intel-ethernet/ixgbe/0001-ixgbe-skip-host-depmod.patch b/recipes-kernel/intel-ethernet/ixgbe/0001-ixgbe-skip-host-depmod.patch
deleted file mode 100644
index 0041af57..00000000
--- a/recipes-kernel/intel-ethernet/ixgbe/0001-ixgbe-skip-host-depmod.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1From 5f87ef7ed60bc9762467184ed0a6d000b80713d9 Mon Sep 17 00:00:00 2001
2From: sweeaun <swee.aun.khor@intel.com>
3Date: Sun, 8 Apr 2018 17:21:52 +0800
4Subject: [PATCH] ixgbe: skip host depmod
5
6Upstream-Status: Inappropriate [Cross-Compile]
7
8Depmod during do_install is irrelevant when cross-compiling.
9Remove the depmod steps during do_install.
10
11Signed-off-by: sweeaun <swee.aun.khor@intel.com>
12---
13 Makefile | 2 --
14 1 file changed, 2 deletions(-)
15
16diff --git a/Makefile b/Makefile
17index 545489a..07e422f 100644
18--- a/Makefile
19+++ b/Makefile
20@@ -141,8 +141,6 @@ install: default manfile
21 @install -D -m 644 ${DRIVER}.${MANSECTION}.gz ${INSTALL_MOD_PATH}${MANDIR}/man${MANSECTION}/${DRIVER}.${MANSECTION}.gz
22 @echo "Installing modules..."
23 @+$(call devkernelbuild,modules_install)
24- @echo "Running depmod..."
25- @$(call cmd_depmod)
26
27 uninstall:
28 rm -f ${INSTALL_MOD_PATH}/lib/modules/${KVER}/${INSTALL_MOD_DIR}/${DRIVER}.ko;
29--
302.7.4
31
diff --git a/recipes-kernel/intel-ethernet/ixgbe_5.19.6.bb b/recipes-kernel/intel-ethernet/ixgbe_5.19.6.bb
new file mode 100644
index 00000000..7ef38650
--- /dev/null
+++ b/recipes-kernel/intel-ethernet/ixgbe_5.19.6.bb
@@ -0,0 +1,43 @@
1SUMMARY="ixgbe kernel driver for Intel Magnolia Park 10GbE"
2DESCRIPTION="The ixgbe driver supports 82598- and 82599-based \
3PCI Express* 10 Gigabit Network Connections."
4
5HOMEPAGE = "https://sourceforge.net/projects/e1000/"
6SECTION = "kernel/network"
7LICENSE = "GPL-2.0-only"
8LIC_FILES_CHKSUM = "file://${WORKDIR}/${BP}/COPYING;md5=a216b4192dc6b777b6f0db560e9a8417"
9
10SRC_URI = "https://sourceforge.net/projects/e1000/files/ixgbe%20stable/${PV}/${BP}.tar.gz \
11 "
12
13SRC_URI[sha256sum] = "a844f1fea8064e30b276792455c3b286c1d7af26731e8f865d4a4e9ed1dcf4ab"
14
15UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/e1000/files/ixgbe%20stable/"
16UPSTREAM_CHECK_REGEX = "ixgbe%20stable/(?P<pver>\d+(\.\d+)+)/"
17
18CVE_PRODUCT = "linux:linux_kernel_ixgbe"
19
20S = "${WORKDIR}/${BP}/src"
21
22EXTRA_OEMAKE=' KSRC="${STAGING_KERNEL_DIR}" KOBJ="${STAGING_KERNEL_BUILDDIR}" KVER="${KERNEL_VERSION}" INSTALL_MOD_PATH="${D}"'
23
24KERNEL_MODULE_AUTOLOAD:append:intel-core2-32 = " ixgbe"
25KERNEL_MODULE_AUTOLOAD:append:intel-corei7-64 = " ixgbe"
26
27inherit module
28
29do_install:append () {
30 # Install scripts/set_irq_affinity
31 install -d ${D}${sysconfdir}/network
32 install -m 0755 ${S}/../scripts/set_irq_affinity ${D}${sysconfdir}/network
33
34 rm -rf ${D}${prefix}/man
35}
36
37PACKAGES += "${PN}-script"
38
39FILES:${PN}-script += "${sysconfdir}/network/set_irq_affinity"
40
41EXCLUDE_FROM_WORLD = "1"
42
43CVE_STATUS[CVE-2015-1142857] = "fixed-version: Fixed from version 4.4-rc1"
diff --git a/recipes-kernel/intel-ethernet/ixgbe_5.3.6.bb b/recipes-kernel/intel-ethernet/ixgbe_5.3.6.bb
deleted file mode 100644
index 8d71ac55..00000000
--- a/recipes-kernel/intel-ethernet/ixgbe_5.3.6.bb
+++ /dev/null
@@ -1,37 +0,0 @@
1SUMMARY="ixgbe kernel driver for Intel Magnolia Park 10GbE"
2DESCRIPTION="The ixgbe driver supports 82598- and 82599-based \
3PCI Express* 10 Gigabit Network Connections."
4
5HOMEPAGE = "https://sourceforge.net/projects/e1000/"
6SECTION = "kernel/network"
7LICENSE = "GPLv2"
8LIC_FILES_CHKSUM = "file://${WORKDIR}/${BP}/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
9
10SRC_URI = "https://sourceforge.net/projects/e1000/files/ixgbe%20stable/${PV}/${BP}.tar.gz \
11 file://0001-ixgbe-skip-host-depmod.patch \
12 "
13
14SRC_URI[md5sum] = "d6816f2b6b8bddfa2d78267f84770d91"
15SRC_URI[sha256sum] = "6ba26de1bb9b55b92f5f54c6c7b25f837323ec3322a6ee54e882c8e54e6d0eaa"
16
17S = "${WORKDIR}/${BP}/src"
18MODULES_INSTALL_TARGET = "install"
19
20EXTRA_OEMAKE='KSRC="${STAGING_KERNEL_BUILDDIR}" KVER="${KERNEL_VERSION}" INSTALL_MOD_PATH="${D}"'
21
22KERNEL_MODULE_AUTOLOAD_append_intel-core2-32 = " ixgbe"
23KERNEL_MODULE_AUTOLOAD_append_intel-corei7-64 = " ixgbe"
24
25inherit module
26
27do_install_append () {
28 # Install scripts/set_irq_affinity
29 install -d ${D}${sysconfdir}/network
30 install -m 0755 ${S}/../scripts/set_irq_affinity ${D}${sysconfdir}/network
31
32 rm -rf ${D}${prefix}/man
33}
34
35PACKAGES += "${PN}-script"
36
37FILES_${PN}-script += "${sysconfdir}/network/set_irq_affinity"
diff --git a/recipes-kernel/intel-ethernet/ixgbevf/0001-Makefile-check-for-CONFIG_IXGBEVF-instead.patch b/recipes-kernel/intel-ethernet/ixgbevf/0001-Makefile-check-for-CONFIG_IXGBEVF-instead.patch
deleted file mode 100644
index 49a59496..00000000
--- a/recipes-kernel/intel-ethernet/ixgbevf/0001-Makefile-check-for-CONFIG_IXGBEVF-instead.patch
+++ /dev/null
@@ -1,27 +0,0 @@
1From b1d7f46442e50458311573443a5c78637874f62b Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Thu, 12 Apr 2018 11:46:15 +0800
4Subject: [PATCH] Makefile: check for CONFIG_IXGBEVF instead
5
6Check for the correct config, otherwise it won't build with kbuild.
7
8Upstream-Status: Pending
9
10Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
11---
12 src/Makefile | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/Makefile b/Makefile
16index 968ef5e..e3cb81b 100644
17--- a/Makefile
18+++ b/Makefile
19@@ -28,7 +28,7 @@ ifneq ($(KERNELRELEASE),)
20 # Makefile for the Intel(R) 10GbE PCI Express Virtual Function Driver
21 #
22
23-obj-$(CONFIG_IXGBE) += ixgbevf.o
24+obj-$(CONFIG_IXGBEVF) += ixgbevf.o
25
26 define ixgbevf-y
27 ixgbevf_main.o
diff --git a/recipes-kernel/intel-ethernet/ixgbevf/0001-ixgbevf-skip-host-depmod.patch b/recipes-kernel/intel-ethernet/ixgbevf/0001-ixgbevf-skip-host-depmod.patch
deleted file mode 100644
index 656a897d..00000000
--- a/recipes-kernel/intel-ethernet/ixgbevf/0001-ixgbevf-skip-host-depmod.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1From 9677d09f5c3984997ac8e7d90b5d4b11fb9ce277 Mon Sep 17 00:00:00 2001
2From: sweeaun <swee.aun.khor@intel.com>
3Date: Sat, 7 Oct 2017 20:56:35 -0700
4Subject: [PATCH] ixgbevf: skip host depmod
5
6Upstream-Status: Inappropriate [Cross-Compile]
7
8Depmod during do_install is irrelevant when cross-compiling.
9Remove the depmod steps during do_install.
10
11Signed-off-by: sweeaun <swee.aun.khor@intel.com>
12---
13 Makefile | 2 --
14 1 file changed, 2 deletions(-)
15
16diff --git a/Makefile b/Makefile
17index 91df705..1dcf350 100644
18--- a/Makefile
19+++ b/Makefile
20@@ -104,8 +104,6 @@ modules_install: default manfile
21 @install -D -m 644 ${DRIVER}.${MANSECTION}.gz ${INSTALL_MOD_PATH}${MANDIR}/man${MANSECTION}/${DRIVER}.${MANSECTION}.gz
22 @echo "Installing modules..."
23 @+$(call kernelbuild,modules_install)
24- @echo "Running depmod..."
25- @$(call cmd_depmod)
26
27 uninstall:
28 rm -f ${INSTALL_MOD_PATH}/lib/modules/${KVER}/${INSTALL_MOD_DIR}/${DRIVER}.ko;
29--
302.7.4
31
diff --git a/recipes-kernel/intel-ethernet/ixgbevf_4.3.5.bb b/recipes-kernel/intel-ethernet/ixgbevf_4.18.7.bb
index 6f1ca081..b21796c6 100644
--- a/recipes-kernel/intel-ethernet/ixgbevf_4.3.5.bb
+++ b/recipes-kernel/intel-ethernet/ixgbevf_4.18.7.bb
@@ -7,28 +7,29 @@ The guest OS loading this driver must support MSI-X interrupts."
7 7
8HOMEPAGE = "https://sourceforge.net/projects/e1000/" 8HOMEPAGE = "https://sourceforge.net/projects/e1000/"
9SECTION = "kernel/network" 9SECTION = "kernel/network"
10LICENSE = "GPLv2" 10LICENSE = "GPL-2.0-only"
11LIC_FILES_CHKSUM = "file://${WORKDIR}/${BP}/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" 11LIC_FILES_CHKSUM = "file://${WORKDIR}/${BP}/COPYING;md5=a216b4192dc6b777b6f0db560e9a8417"
12 12
13SRC_URI = "https://sourceforge.net/projects/e1000/files/ixgbevf%20stable/${PV}/${BP}.tar.gz \ 13SRC_URI = "https://sourceforge.net/projects/e1000/files/ixgbevf%20stable/${PV}/${BP}.tar.gz \
14 file://0001-ixgbevf-skip-host-depmod.patch \
15 file://0001-Makefile-check-for-CONFIG_IXGBEVF-instead.patch \
16 " 14 "
17 15
18SRC_URI[md5sum] = "cdd9c52f034223c114d4b10345d11fe9" 16SRC_URI[sha256sum] = "90f6cd614008839b6fc748ae0f4ad3503435f8b788318d4f40cfc83c7029025e"
19SRC_URI[sha256sum] = "f2ae017462bd1ea8082710580ec3dadfc322a0b2ecd4a576a16f0a4b622e5968" 17
18UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/e1000/files/ixgbevf%20stable/"
19UPSTREAM_CHECK_REGEX = "ixgbevf%20stable/(?P<pver>\d+(\.\d+)+)/"
20
21CVE_PRODUCT = "linux:linux_kernel_ixgbe"
20 22
21S = "${WORKDIR}/${BP}/src" 23S = "${WORKDIR}/${BP}/src"
22MODULES_INSTALL_TARGET = "install"
23 24
24EXTRA_OEMAKE='KSRC="${STAGING_KERNEL_BUILDDIR}" KVER="${KERNEL_VERSION}" INSTALL_MOD_PATH="${D}"' 25EXTRA_OEMAKE='KSRC="${STAGING_KERNEL_DIR}" KOBJ="${STAGING_KERNEL_BUILDDIR}" KVER="${KERNEL_VERSION}" INSTALL_MOD_PATH="${D}"'
25 26
26KERNEL_MODULE_AUTOLOAD_append_intel-core2-32 = " ixgbevf" 27KERNEL_MODULE_AUTOLOAD:append:intel-core2-32 = " ixgbevf"
27KERNEL_MODULE_AUTOLOAD_append_intel-corei7-64 = " ixgbevf" 28KERNEL_MODULE_AUTOLOAD:append:intel-corei7-64 = " ixgbevf"
28 29
29inherit module 30inherit module
30 31
31do_install_append () { 32do_install:append () {
32 # Install scripts/set_irq_affinity 33 # Install scripts/set_irq_affinity
33 install -d ${D}${sysconfdir}/network 34 install -d ${D}${sysconfdir}/network
34 install -m 0755 ${S}/../scripts/set_irq_affinity ${D}${sysconfdir}/network 35 install -m 0755 ${S}/../scripts/set_irq_affinity ${D}${sysconfdir}/network
@@ -38,4 +39,8 @@ do_install_append () {
38 39
39PACKAGES += "${PN}-script" 40PACKAGES += "${PN}-script"
40 41
41FILES_${PN}-script += "${sysconfdir}/network/set_irq_affinity" 42FILES:${PN}-script += "${sysconfdir}/network/set_irq_affinity"
43
44CVE_STATUS[CVE-2015-1142857] = "fixed-version: Fixed from version 4.4-rc1"
45
46EXCLUDE_FROM_WORLD = "1"
diff --git a/recipes-kernel/iwlwifi/backport-iwlwifi/0001-hrtimer-fix-version-numbers-because-production-kerne.patch b/recipes-kernel/iwlwifi/backport-iwlwifi/0001-hrtimer-fix-version-numbers-because-production-kerne.patch
deleted file mode 100644
index 4fdc36f7..00000000
--- a/recipes-kernel/iwlwifi/backport-iwlwifi/0001-hrtimer-fix-version-numbers-because-production-kerne.patch
+++ /dev/null
@@ -1,87 +0,0 @@
1From ecb29b78ce946c802058be0c46a0d20432f412e5 Mon Sep 17 00:00:00 2001
2From: Saul Wold <sgw@linux.intel.com>
3Date: Thu, 28 Sep 2017 10:51:15 -0700
4Subject: [PATCH] hrtimer: fix version numbers because production kernel has
5 update
6
7Decrease the version check because the OTC production kernel which is
84.9 includes the HRTimer code that this is using.
9
10Upstream-Status: [Backport] It's been backported into the older kernel
11Signed-off-by: Saul Wold <sgw@linux.intel.com>
12---
13 backport-include/linux/hrtimer.h | 2 +-
14 drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 2 +-
15 drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 2 +-
16 drivers/net/wireless/intel/iwlwifi/trans_slave/shared.c | 2 +-
17 net/mac80211/tx.c | 2 +-
18 5 files changed, 5 insertions(+), 5 deletions(-)
19
20diff --git a/backport-include/linux/hrtimer.h b/backport-include/linux/hrtimer.h
21index bdcf106e1..ae128852d 100644
22--- a/backport-include/linux/hrtimer.h
23+++ b/backport-include/linux/hrtimer.h
24@@ -4,7 +4,7 @@
25 #include_next <linux/hrtimer.h>
26 #include <linux/interrupt.h>
27
28-#if LINUX_VERSION_IS_LESS(4,10,0)
29+#if LINUX_VERSION_IS_LESS(4,9,0)
30 static inline void backport_hrtimer_start(struct hrtimer *timer, s64 time,
31 const enum hrtimer_mode mode)
32 {
33diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
34index cf1f95a01..e6f1ff294 100644
35--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
36+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
37@@ -1310,7 +1310,7 @@ static void iwl_mvm_tx_lat_add_ts_ack(struct sk_buff *skb)
38 s64 ts_1 = ktime_to_ns(skb->tstamp) >> 32;
39 s64 diff = temp - ts_1;
40
41-#if LINUX_VERSION_IS_LESS(4,10,0)
42+#if LINUX_VERSION_IS_LESS(4,9,0)
43 skb->tstamp.tv64 += diff;
44 #else
45 skb->tstamp += diff;
46diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c
47index df81bce25..ad664bacd 100644
48--- a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c
49+++ b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c
50@@ -1955,7 +1955,7 @@ static void iwl_trans_pci_tx_lat_add_ts_write(struct sk_buff *skb)
51 s64 ts_1 = ktime_to_ns(skb->tstamp) >> 32;
52 s64 diff = temp - ts_1;
53
54-#if LINUX_VERSION_IS_LESS(4,10,0)
55+#if LINUX_VERSION_IS_LESS(4,9,0)
56 skb->tstamp.tv64 += diff << 16;
57 #else
58 skb->tstamp += diff << 16;
59diff --git a/drivers/net/wireless/intel/iwlwifi/trans_slave/shared.c b/drivers/net/wireless/intel/iwlwifi/trans_slave/shared.c
60index e4d45bcf7..cdd0ba9a2 100644
61--- a/drivers/net/wireless/intel/iwlwifi/trans_slave/shared.c
62+++ b/drivers/net/wireless/intel/iwlwifi/trans_slave/shared.c
63@@ -796,7 +796,7 @@ void iwl_slv_tx_lat_add_ts_write(struct iwl_trans_slv *trans_slv,
64
65 ts_1 = ktime_to_ns(data_entry->skb->tstamp) >> 32;
66 diff = temp - ts_1;
67-#if LINUX_VERSION_IS_LESS(4,10,0)
68+#if LINUX_VERSION_IS_LESS(4,9,0)
69 data_entry->skb->tstamp.tv64 += diff << 16;
70 #else
71 data_entry->skb->tstamp += diff << 16;
72diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
73index 94a348688..0f226c413 100644
74--- a/net/mac80211/tx.c
75+++ b/net/mac80211/tx.c
76@@ -2278,7 +2278,7 @@ static void ieee80211_tx_latency_start_msrmnt(struct ieee80211_local *local,
77 if (!tx_latency && !tx_consec && !tx_thrshld)
78 return;
79 temp = ktime_to_ms(ktime_get());
80-#if LINUX_VERSION_IS_LESS(4,10,0)
81+#if LINUX_VERSION_IS_LESS(4,9,0)
82 skb->tstamp.tv64 += temp << 32;
83 #else
84 skb->tstamp += temp << 32;
85--
862.13.5
87
diff --git a/recipes-kernel/iwlwifi/backport-iwlwifi_git.bb b/recipes-kernel/iwlwifi/backport-iwlwifi_git.bb
index 0173ef83..ea36cfc3 100644
--- a/recipes-kernel/iwlwifi/backport-iwlwifi_git.bb
+++ b/recipes-kernel/iwlwifi/backport-iwlwifi_git.bb
@@ -1,13 +1,13 @@
1SUMMARY = "Intel Wireless LinuxCore kernel driver" 1SUMMARY = "Intel Wireless LinuxCore kernel driver"
2DESCRIPTION = "Intel Wireless LinuxCore kernel driver" 2DESCRIPTION = "Intel Wireless LinuxCore kernel driver"
3SECTION = "kernel" 3SECTION = "kernel"
4LICENSE = "GPLv2" 4LICENSE = "GPL-2.0-only"
5 5
6REQUIRED_DISTRO_FEATURES = "wifi" 6REQUIRED_DISTRO_FEATURES = "wifi"
7 7
8LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" 8LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
9 9
10inherit module 10inherit module features_check
11 11
12# For some iwfwifi LinuxCore supported wireless chips, the best/latest 12# For some iwfwifi LinuxCore supported wireless chips, the best/latest
13# firmware blobs are found in the iwlwifi's linux-firmware.git fork. 13# firmware blobs are found in the iwlwifi's linux-firmware.git fork.
@@ -17,16 +17,12 @@ inherit module
17# When updating this recipe, ensure that the proper firmware is included from 17# When updating this recipe, ensure that the proper firmware is included from
18# either the linux-firmware or iwlwifi-firmware repos. 18# either the linux-firmware or iwlwifi-firmware repos.
19 19
20PV = "30" 20PV = "79"
21SRCREV = "b31221a99488021300e7f89d2ecf9bdd2bc52dd2" 21SRCREV = "574631d89d736fd2c76b0e2ea489270c50903e52"
22
23# Add a patch for Intel's Production Kernel as it's got a backport of HRTimers
24PK_PATCH = "${@bb.utils.contains('PREFERRED_PROVIDER_virtual/kernel','linux-intel','file://0001-hrtimer-fix-version-numbers-because-production-kerne.patch','',d)}"
25 22
26SRC_URI = " \ 23SRC_URI = " \
27 git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi;branch=release/LinuxCore${PV} \ 24 git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi;branch=release/core${PV} \
28 file://0001-Makefile.real-skip-host-install-scripts.patch \ 25 file://0001-Makefile.real-skip-host-install-scripts.patch \
29 ${PK_PATCH} \
30 file://iwlwifi.conf \ 26 file://iwlwifi.conf \
31 " 27 "
32 28
@@ -40,15 +36,19 @@ do_configure() {
40 36
41MODULES_INSTALL_TARGET="install" 37MODULES_INSTALL_TARGET="install"
42 38
43do_install_append() { 39do_install:append() {
44 ## install configs and service scripts 40 ## install configs and service scripts
45 install -d ${D}${sysconfdir}/modprobe.d 41 install -d ${D}${sysconfdir}/modprobe.d
46 install -m 0644 ${WORKDIR}/iwlwifi.conf ${D}${sysconfdir}/modprobe.d 42 install -m 0644 ${WORKDIR}/iwlwifi.conf ${D}${sysconfdir}/modprobe.d
47} 43}
48 44
49RDEPENDS_${PN} = "linux-firmware-iwlwifi" 45RDEPENDS:${PN} = "linux-firmware-iwlwifi"
46
47FILES:${PN} += "${sysconfdir}/modprobe.d/iwlwifi.conf"
50 48
51KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " iwlwifi" 49KERNEL_MODULE_AUTOLOAD:append:core2-32-intel-common = " iwlwifi"
52KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " iwlwifi" 50KERNEL_MODULE_AUTOLOAD:append:corei7-64-intel-common = " iwlwifi"
53 51
54KERNEL_MODULE_PACKAGE_PREFIX = "backport-iwlwifi" 52KERNEL_MODULE_PACKAGE_PREFIX = "backport-iwlwifi"
53
54EXCLUDE_FROM_WORLD = "1"
diff --git a/recipes-kernel/linux/linux-intel-rt_4.14.bb b/recipes-kernel/linux/linux-intel-rt_4.14.bb
deleted file mode 100644
index 688cf7a9..00000000
--- a/recipes-kernel/linux/linux-intel-rt_4.14.bb
+++ /dev/null
@@ -1,24 +0,0 @@
1require linux-intel.inc
2
3# Skip processing of this recipe if it is not explicitly specified as the
4# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
5# to build multiple virtual/kernel providers, e.g. as dependency of
6# core-image-rt-sdk, core-image-rt.
7python () {
8 if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-intel-rt":
9 raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-intel-rt to enable it")
10}
11
12KBRANCH = "4.14/preempt-rt"
13KMETA_BRANCH = "yocto-4.14"
14
15# Fix for 32-bit perf issue. Remove when patch is backported to 4.14.
16SRC_URI_append = " file://0001-perf-x86-32-explicitly-include-errno.h.patch"
17
18DEPENDS += "elfutils-native openssl-native util-linux-native"
19
20LINUX_VERSION ?= "4.14.40"
21SRCREV_machine ?= "9e7ff06e56a4938e43c09273107876c22eed1398"
22SRCREV_meta ?= "245d701df6c3691a078a268eff54009959beb842"
23
24LINUX_KERNEL_TYPE = "preempt-rt"
diff --git a/recipes-kernel/linux/linux-intel-rt_4.9.bb b/recipes-kernel/linux/linux-intel-rt_4.9.bb
deleted file mode 100644
index 86233811..00000000
--- a/recipes-kernel/linux/linux-intel-rt_4.9.bb
+++ /dev/null
@@ -1,20 +0,0 @@
1
2require linux-intel.inc
3
4# Skip processing of this recipe if it is not explicitly specified as the
5# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
6# to build multiple virtual/kernel providers, e.g. as dependency of
7# core-image-rt-sdk, core-image-rt.
8python () {
9 if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-intel-rt":
10 raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-intel-rt to enable it")
11}
12
13KBRANCH = "4.9/yocto/base-rt"
14KMETA_BRANCH = "yocto-4.9"
15
16LINUX_VERSION ?= "4.9.84"
17SRCREV_machine ?= "33b17c3a62dc470c849f85ce2a90cfa90e96bcf5"
18SRCREV_meta ?= "a2dfb1610d9dad34652a3c27c6c9d8751ed67af6"
19
20LINUX_KERNEL_TYPE = "preempt-rt"
diff --git a/recipes-kernel/linux/linux-intel-rt_6.6.bb b/recipes-kernel/linux/linux-intel-rt_6.6.bb
new file mode 100644
index 00000000..342679eb
--- /dev/null
+++ b/recipes-kernel/linux/linux-intel-rt_6.6.bb
@@ -0,0 +1,33 @@
1require linux-intel.inc
2
3SRC_URI:prepend = "git://github.com/intel/linux-intel-lts.git;protocol=https;name=machine;branch=${KBRANCH}; \
4 "
5
6# Skip processing of this recipe if it is not explicitly specified as the
7# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying
8# to build multiple virtual/kernel providers, e.g. as dependency of
9# core-image-rt-sdk, core-image-rt.
10python () {
11 if d.getVar("KERNEL_PACKAGE_NAME", True) == "kernel" and d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-intel-rt":
12 raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-intel-rt to enable it")
13}
14
15KBRANCH = "6.6/preempt-rt"
16KMETA_BRANCH = "yocto-6.6"
17
18LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
19
20DEPENDS += "elfutils-native openssl-native util-linux-native"
21
22LINUX_VERSION_EXTENSION ??= "-intel-pk-${LINUX_KERNEL_TYPE}"
23
24LINUX_VERSION ?= "6.6.25"
25SRCREV_machine ?= "f8939454cf9bb7277239bb44e90c99474c599f37"
26SRCREV_meta ?= "c3d1322fb6ff68cdcf4d7a3c1140d81bfdc1320a"
27
28LINUX_KERNEL_TYPE = "preempt-rt"
29
30# Functionality flags
31KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/security/security.scc"
32
33UPSTREAM_CHECK_GITTAGREGEX = "^lts-(?P<pver>v6.6.(\d+)-rt(\d)-preempt-rt-(\d+)T(\d+)Z)$"
diff --git a/recipes-kernel/linux/linux-intel.inc b/recipes-kernel/linux/linux-intel.inc
index 2525c70d..f78f5205 100644
--- a/recipes-kernel/linux/linux-intel.inc
+++ b/recipes-kernel/linux/linux-intel.inc
@@ -1,26 +1,24 @@
1require recipes-kernel/linux/linux-yocto.inc 1require recipes-kernel/linux/linux-yocto.inc
2require recipes-kernel/linux/meta-intel-compat-kernel.inc 2require recipes-kernel/linux/meta-intel-compat-kernel.inc
3 3
4FILESEXTRAPATHS_prepend := "${THISDIR}/linux-intel:" 4FILESEXTRAPATHS:prepend := "${THISDIR}/linux-intel:"
5 5
6KERNEL_CONFIG_URI ?= "git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=${KMETA_BRANCH};destsuffix=${KMETA}" 6KERNEL_CONFIG_URI ?= "git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=${KMETA_BRANCH};destsuffix=${KMETA}"
7 7
8SRC_URI = " \ 8SRC_URI = " \
9 git://github.com/intel/linux-intel-lts.git;protocol=https;name=machine;branch=${KBRANCH}; \
10 file://0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch \
11 ${KERNEL_CONFIG_URI} \ 9 ${KERNEL_CONFIG_URI} \
10 file://0001-vt-conmakehash-improve-reproducibility.patch \
11 file://0001-lib-build_OID_registry-fix-reproducibility-issues.patch \
12 file://fix-perf-reproducibility.patch \
13 file://0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-.patch \
14 file://0002-mconf-fix-output-of-cflags-and-libraries.patch \
12 " 15 "
13 16
14SRC_URI_append_core2-32-intel-common = " file://disable_skylake_sound.cfg"
15
16LINUX_VERSION_EXTENSION ?= "-intel-pk-${LINUX_KERNEL_TYPE}"
17
18PV = "${LINUX_VERSION}+git${SRCPV}" 17PV = "${LINUX_VERSION}+git${SRCPV}"
19 18
20KMETA = "kernel-meta" 19KMETA = "kernel-meta"
21KCONF_BSP_AUDIT_LEVEL = "2" 20KCONF_BSP_AUDIT_LEVEL = "0"
22 21
23COMPATIBLE_MACHINE ?= "(intel-corei7-64|intel-core2-32)" 22COMPATIBLE_MACHINE ?= "(intel-corei7-64)"
24 23
25KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" 24KERNEL_FEATURES:append = " ${KERNEL_EXTRA_FEATURES}"
26KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
diff --git a/recipes-kernel/linux/linux-intel/0001-lib-build_OID_registry-fix-reproducibility-issues.patch b/recipes-kernel/linux/linux-intel/0001-lib-build_OID_registry-fix-reproducibility-issues.patch
new file mode 100644
index 00000000..d41c3f0b
--- /dev/null
+++ b/recipes-kernel/linux/linux-intel/0001-lib-build_OID_registry-fix-reproducibility-issues.patch
@@ -0,0 +1,48 @@
1From 2fca0fd719812ea2ff67630b01355aa80481623e Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@gmail.com>
3Date: Sun, 10 Jul 2022 22:56:53 -0400
4Subject: [PATCH] lib/build_OID_registry: fix reproducibility issues
5
6The script build_OID_registry captures the full path of itself
7in the generated data. This causes reproduciblity issues as the
8path is captured and packaged.
9
10We use the basename of the script instead, and that allows us
11to be reprodicible, with slightly less information captured in
12the output data (but the generating script can still easily
13be found).
14
15Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
16Upstream-Status: Inappropriate
17
18Taken from linux-yocto, v5.15/standard/base.
19
20Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
21---
22 lib/build_OID_registry | 3 ++-
23 1 file changed, 2 insertions(+), 1 deletion(-)
24
25diff --git a/lib/build_OID_registry b/lib/build_OID_registry
26index d7fc32ea8ac2..f6de0a7f7457 100755
27--- a/lib/build_OID_registry
28+++ b/lib/build_OID_registry
29@@ -8,6 +8,7 @@
30 #
31
32 use strict;
33+use File::Basename;
34
35 my @names = ();
36 my @oids = ();
37@@ -35,7 +36,7 @@ close IN_FILE || die;
38 #
39 open C_FILE, ">$ARGV[1]" or die;
40 print C_FILE "/*\n";
41-print C_FILE " * Automatically generated by ", $0, ". Do not edit\n";
42+print C_FILE " * Automatically generated by ", basename $0, ". Do not edit\n";
43 print C_FILE " */\n";
44
45 #
46--
472.36.1
48
diff --git a/recipes-kernel/linux/linux-intel/0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch b/recipes-kernel/linux/linux-intel/0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch
deleted file mode 100644
index a9e9213b..00000000
--- a/recipes-kernel/linux/linux-intel/0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch
+++ /dev/null
@@ -1,62 +0,0 @@
1From e6ebc8e654bba53f28af5229a1069fc74fa58b7b Mon Sep 17 00:00:00 2001
2From: Jason Wessel <jason.wessel@windriver.com>
3Date: Thu, 25 Sep 2014 11:26:49 -0700
4Subject: [PATCH] menuconfig,check-lxdiaglog.sh: Allow specification of ncurses
5 location
6
7In some cross build environments such as the Yocto Project build
8environment it provides an ncurses library that is compiled
9differently than the host's version. This causes display corruption
10problems when the host's curses includes are used instead of the
11includes from the provided compiler are overridden. There is a second
12case where there is no curses libraries at all on the host system and
13menuconfig will just fail entirely.
14
15The solution is simply to allow an override variable in
16check-lxdialog.sh for environments such as the Yocto Project. Adding
17a CROSS_CURSES_LIB and CROSS_CURSES_INC solves the issue and allowing
18compiling and linking against the right headers and libraries.
19
20Upstream-Status: submitted [https://lkml.org/lkml/2013/3/3/103]
21
22Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
23cc: Michal Marek <mmarek@suse.cz>
24cc: linux-kbuild@vger.kernel.org
25Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
26Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
27---
28 scripts/kconfig/lxdialog/check-lxdialog.sh | 8 ++++++++
29 1 file changed, 8 insertions(+)
30 mode change 100755 => 100644 scripts/kconfig/lxdialog/check-lxdialog.sh
31
32diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh
33old mode 100755
34new mode 100644
35index 5075ebf2d3b9..ba9242101190
36--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
37+++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
38@@ -4,6 +4,10 @@
39 # What library to link
40 ldflags()
41 {
42+ if [ "$CROSS_CURSES_LIB" != "" ]; then
43+ echo "$CROSS_CURSES_LIB"
44+ exit
45+ fi
46 pkg-config --libs ncursesw 2>/dev/null && exit
47 pkg-config --libs ncurses 2>/dev/null && exit
48 for ext in so a dll.a dylib ; do
49@@ -21,6 +25,10 @@ ldflags()
50 # Where is ncurses.h?
51 ccflags()
52 {
53+ if [ x"$CROSS_CURSES_INC" != x ]; then
54+ echo "$CROSS_CURSES_INC"
55+ exit
56+ fi
57 if pkg-config --cflags ncursesw 2>/dev/null; then
58 echo '-DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1'
59 elif pkg-config --cflags ncurses 2>/dev/null; then
60--
612.14.3
62
diff --git a/recipes-kernel/linux/linux-intel/0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-.patch b/recipes-kernel/linux/linux-intel/0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-.patch
new file mode 100644
index 00000000..a601e783
--- /dev/null
+++ b/recipes-kernel/linux/linux-intel/0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-.patch
@@ -0,0 +1,52 @@
1From 1811da09f42ca5e82282970e8ad014707bc94c82 Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@windriver.com>
3Date: Mon, 2 Jul 2018 23:10:28 -0400
4Subject: [PATCH 1/2] menuconfig,mconf-cfg: Allow specification of ncurses
5 location
6
7In some cross build environments such as the Yocto Project build
8environment it provides an ncurses library that is compiled
9differently than the host's version. This causes display corruption
10problems when the host's curses includes are used instead of the
11includes from the provided compiler are overridden. There is a second
12case where there is no curses libraries at all on the host system and
13menuconfig will just fail entirely.
14
15The solution is simply to allow an override variable in
16check-lxdialog.sh for environments such as the Yocto Project. Adding
17a CROSS_CURSES_LIB and CROSS_CURSES_INC solves the issue and allowing
18compiling and linking against the right headers and libraries.
19
20Upstream-Status: Submitted
21
22Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
23cc: Michal Marek <mmarek@suse.cz>
24cc: linux-kbuild@vger.kernel.org
25Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
26Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
27---
28 scripts/kconfig/mconf-cfg.sh | 8 ++++++++
29 1 file changed, 8 insertions(+)
30
31diff --git a/scripts/kconfig/mconf-cfg.sh b/scripts/kconfig/mconf-cfg.sh
32index 1e61f50a5905..38cf8304bb31 100755
33--- a/scripts/kconfig/mconf-cfg.sh
34+++ b/scripts/kconfig/mconf-cfg.sh
35@@ -7,6 +7,14 @@ libs=$2
36 PKG="ncursesw"
37 PKG2="ncurses"
38
39+if [ "$CROSS_CURSES_LIB" != "" ]; then
40+ echo libs=\'$CROSS_CURSES_LIB\'
41+ if [ x"$CROSS_CURSES_INC" != x ]; then
42+ echo cflags=\'$CROSS_CURSES_INC\'
43+ fi
44+ exit 0
45+fi
46+
47 if [ -n "$(command -v ${HOSTPKG_CONFIG})" ]; then
48 if ${HOSTPKG_CONFIG} --exists $PKG; then
49 ${HOSTPKG_CONFIG} --cflags ${PKG} > ${cflags}
50--
512.34.1
52
diff --git a/recipes-kernel/linux/linux-intel/0001-perf-x86-32-explicitly-include-errno.h.patch b/recipes-kernel/linux/linux-intel/0001-perf-x86-32-explicitly-include-errno.h.patch
deleted file mode 100644
index 5c8b27c7..00000000
--- a/recipes-kernel/linux/linux-intel/0001-perf-x86-32-explicitly-include-errno.h.patch
+++ /dev/null
@@ -1,41 +0,0 @@
1From 57af599929263e7bb6f2f369c9e4bc1e440528a9 Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@windriver.com>
3Date: Mon, 21 Aug 2017 13:52:53 -0400
4Subject: [PATCH 1/1] perf: x86-32: explicitly include <errno.h>
5
6Upstream-Status: submitted
7
8The 32bit x86 perf build does not find the system definitions of error
9return values, hence we end up with:
10
11| In file included from util/libunwind/x86_32.c:32:0:
12| util/libunwind/../../arch/x86/util/unwind-libunwind.c: In function 'libunwind__x86_reg_id':
13| util/libunwind/../../arch/x86/util/unwind-libunwind.c:109:11: error: 'EINVAL' undeclared (first use in this function); did you mean 'UNW_EINVAL'?
14| return -EINVAL;
15| ^~~~~~
16| UNW_EINVAL
17
18By explicitly including errno.h, we can fix this build without impacting
19other architectures.
20
21Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
22---
23
24 tools/perf/util/libunwind/x86_32.c | 1 +
25 1 file changed, 1 insertion(+)
26
27diff --git a/tools/perf/util/libunwind/x86_32.c b/tools/perf/util/libunwind/x86_32.c
28index 957ffff72428..d781f7bdeb88 100644
29--- a/tools/perf/util/libunwind/x86_32.c
30+++ b/tools/perf/util/libunwind/x86_32.c
31@@ -20,6 +20,7 @@
32 #define LIBUNWIND__ARCH_REG_IP PERF_REG_X86_IP
33 #define LIBUNWIND__ARCH_REG_SP PERF_REG_X86_SP
34
35+#include <errno.h>
36 #include "unwind.h"
37 #include "debug.h"
38 #include "libunwind-x86.h"
39--
402.14.3
41
diff --git a/recipes-kernel/linux/linux-intel/0001-vt-conmakehash-improve-reproducibility.patch b/recipes-kernel/linux/linux-intel/0001-vt-conmakehash-improve-reproducibility.patch
new file mode 100644
index 00000000..33280063
--- /dev/null
+++ b/recipes-kernel/linux/linux-intel/0001-vt-conmakehash-improve-reproducibility.patch
@@ -0,0 +1,58 @@
1From 0f586f4ee8adacac79b64d1f3d47799a5eb7fbea Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@gmail.com>
3Date: Sun, 10 Jul 2022 21:37:07 -0400
4Subject: [PATCH] vt/conmakehash: improve reproducibility
5
6The file generated by conmakehash capture the application
7path used to generate the file. While that can be informative,
8it varies based on where the kernel was built, as the full
9path is captured.
10
11We tweak the application to use a second input as the "capture
12name", and then modify the Makefile to pass the basename of
13the source, making it reproducible.
14
15This could be improved by using some sort of path mapping,
16or the application manipualing argv[1] itself, but for now
17this solves the reprodicibility issue.
18
19Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
20
21Upstream-Status: Inappropriate
22
23Taken from linux-yocto, v5.15/standard/base
24Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
25---
26 drivers/tty/vt/Makefile | 2 +-
27 drivers/tty/vt/conmakehash.c | 2 +-
28 2 files changed, 2 insertions(+), 2 deletions(-)
29
30diff --git a/drivers/tty/vt/Makefile b/drivers/tty/vt/Makefile
31index fe30ce512819..cb51c21b58f9 100644
32--- a/drivers/tty/vt/Makefile
33+++ b/drivers/tty/vt/Makefile
34@@ -15,7 +15,7 @@ clean-files := consolemap_deftbl.c defkeymap.c
35 hostprogs += conmakehash
36
37 quiet_cmd_conmk = CONMK $@
38- cmd_conmk = $(obj)/conmakehash $< > $@
39+ cmd_conmk = $(obj)/conmakehash $< $(shell basename $<) > $@
40
41 $(obj)/consolemap_deftbl.c: $(src)/$(FONTMAPFILE) $(obj)/conmakehash
42 $(call cmd,conmk)
43diff --git a/drivers/tty/vt/conmakehash.c b/drivers/tty/vt/conmakehash.c
44index cddd789fe46e..d62510b280e9 100644
45--- a/drivers/tty/vt/conmakehash.c
46+++ b/drivers/tty/vt/conmakehash.c
47@@ -253,7 +253,7 @@ int main(int argc, char *argv[])
48 #include <linux/types.h>\n\
49 \n\
50 u8 dfont_unicount[%d] = \n\
51-{\n\t", argv[1], fontlen);
52+{\n\t", argv[2], fontlen);
53
54 for ( i = 0 ; i < fontlen ; i++ )
55 {
56--
572.36.1
58
diff --git a/recipes-kernel/linux/linux-intel/0002-mconf-fix-output-of-cflags-and-libraries.patch b/recipes-kernel/linux/linux-intel/0002-mconf-fix-output-of-cflags-and-libraries.patch
new file mode 100644
index 00000000..a96b68d9
--- /dev/null
+++ b/recipes-kernel/linux/linux-intel/0002-mconf-fix-output-of-cflags-and-libraries.patch
@@ -0,0 +1,40 @@
1From 1b53d82a8152843afcddd7f16b0c43b6b4f22895 Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@gmail.com>
3Date: Mon, 17 Jul 2023 17:17:55 -0400
4Subject: [PATCH 2/2] mconf: fix output of cflags and libraries
5
6commit 3122c84409d578a5df8bcb1 [kconfig: refactor Makefile to reduce
7process forks] changes the way that flags are detected. They are
8no longer just echo'd and captured, they are written to a file and
9later read.
10
11We adjust our CROSS ncurses patch accordingly.
12
13We'll eventually be able to drop this patch, but not quite yet.
14
15Upstream-Status: Inappropriate [OE-Specific]
16Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
17Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
18---
19 scripts/kconfig/mconf-cfg.sh | 4 ++--
20 1 file changed, 2 insertions(+), 2 deletions(-)
21
22diff --git a/scripts/kconfig/mconf-cfg.sh b/scripts/kconfig/mconf-cfg.sh
23index 38cf8304bb31..a5ae56e08b07 100755
24--- a/scripts/kconfig/mconf-cfg.sh
25+++ b/scripts/kconfig/mconf-cfg.sh
26@@ -8,9 +8,9 @@ PKG="ncursesw"
27 PKG2="ncurses"
28
29 if [ "$CROSS_CURSES_LIB" != "" ]; then
30- echo libs=\'$CROSS_CURSES_LIB\'
31+ echo $CROSS_CURSES_LIB > ${libs}
32 if [ x"$CROSS_CURSES_INC" != x ]; then
33- echo cflags=\'$CROSS_CURSES_INC\'
34+ echo $CROSS_CURSES_INC > ${cflags}
35 fi
36 exit 0
37 fi
38--
392.34.1
40
diff --git a/recipes-kernel/linux/linux-intel/disable_skylake_sound.cfg b/recipes-kernel/linux/linux-intel/disable_skylake_sound.cfg
deleted file mode 100644
index f7d7322e..00000000
--- a/recipes-kernel/linux/linux-intel/disable_skylake_sound.cfg
+++ /dev/null
@@ -1,14 +0,0 @@
1# CONFIG_SND_SOC_INTEL_SKYLAKE is not set
2# CONFIG_SND_SOC_INTEL_BXT_DA7219_MAX98357A_MACH is not set
3# CONFIG_SND_SOC_INTEL_BXT_FLORIDA_MACH is not set
4# CONFIG_SND_SOC_INTEL_BXT_RT298_MACH is not set
5# CONFIG_SND_SOC_INTEL_BXT_TDF8532_MACH is not set
6# CONFIG_SND_SOC_INTEL_KBL_RT5663_MAX98927_MACH is not set
7# CONFIG_SND_SOC_INTEL_SKL_RT286_MACH is not set
8# CONFIG_SND_SOC_INTEL_CNL_WM8281_MACH is not set
9# CONFIG_SND_SOC_INTEL_CNL_RT274_MACH is not set
10# CONFIG_SND_SOC_INTEL_SKL_NAU88L25_SSM4567_MACH is not set
11# CONFIG_SND_SOC_INTEL_SKL_NAU88L25_MAX98357A_MACH is not set
12# CONFIG_SND_SOC_INTEL_CNL_CS42L42_MACH is not set
13# CONFIG_SND_SOC_INTEL_CNL_RT700_MACH is not set
14# CONFIG_SND_SOC_INTEL_CNL_SVFPGA_MACH is not set
diff --git a/recipes-kernel/linux/linux-intel/fix-perf-reproducibility.patch b/recipes-kernel/linux/linux-intel/fix-perf-reproducibility.patch
new file mode 100644
index 00000000..1a98b1db
--- /dev/null
+++ b/recipes-kernel/linux/linux-intel/fix-perf-reproducibility.patch
@@ -0,0 +1,39 @@
1From b8cd0e429bf75b673c438a8277d4bc74327df992 Mon Sep 17 00:00:00 2001
2From: Tom Zanussi <tom.zanussi@intel.com>
3Date: Tue, 3 Jul 2012 13:07:23 -0500
4Subject: perf: change --root to --prefix for python install
5
6Otherwise we get the sysroot path appended to the build path, not what
7we want.
8
9Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
10
11Upstream-Status: Inappropriate
12
13Taken from linux-yocto, v5.15/standard/base
14https://git.yoctoproject.org/linux-yocto/commit?id=b8cd0e429bf75b673c438a8277d4bc74327df992&h=v5.15%2Fstandard%2Fbase
15
16Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
17---
18 tools/perf/Makefile.perf | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21(limited to 'tools/perf/Makefile.perf')
22
23diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
24index 8f738e11356d..ee945d8e3996 100644
25--- a/tools/perf/Makefile.perf
26+++ b/tools/perf/Makefile.perf
27@@ -1022,7 +1022,7 @@ install-bin: install-tools install-tests install-traceevent-plugins
28 install: install-bin try-install-man
29
30 install-python_ext:
31- $(PYTHON_WORD) util/setup.py --quiet install --root='/$(DESTDIR_SQ)'
32+ $(PYTHON_WORD) util/setup.py --quiet install --prefix='$(DESTDIR_SQ)/usr'
33
34 # 'make install-doc' should call 'make -C Documentation install'
35 $(INSTALL_DOC_TARGETS):
36--
37cgit
38
39
diff --git a/recipes-kernel/linux/linux-intel_4.14.bb b/recipes-kernel/linux/linux-intel_4.14.bb
deleted file mode 100644
index f9e07efb..00000000
--- a/recipes-kernel/linux/linux-intel_4.14.bb
+++ /dev/null
@@ -1,20 +0,0 @@
1require linux-intel.inc
2
3KBRANCH = "4.14/base"
4KMETA_BRANCH = "yocto-4.14"
5
6# Fix for 32-bit perf issue. Remove when patch is backported to 4.14.
7SRC_URI_append = " file://0001-perf-x86-32-explicitly-include-errno.h.patch"
8
9DEPENDS += "elfutils-native openssl-native util-linux-native"
10
11LINUX_VERSION ?= "4.14.40"
12SRCREV_machine ?= "de459f4df74cd7d586fc1560bb4249507490be5d"
13SRCREV_meta ?= "245d701df6c3691a078a268eff54009959beb842"
14
15# For Crystalforest and Romley
16KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " uio"
17KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " uio"
18
19# Functionality flags
20KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
diff --git a/recipes-kernel/linux/linux-intel_4.9.bb b/recipes-kernel/linux/linux-intel_4.9.bb
deleted file mode 100644
index d6ba58ac..00000000
--- a/recipes-kernel/linux/linux-intel_4.9.bb
+++ /dev/null
@@ -1,16 +0,0 @@
1
2require linux-intel.inc
3
4KBRANCH = "4.9/yocto/base"
5KMETA_BRANCH = "yocto-4.9"
6
7LINUX_VERSION ?= "4.9.99"
8SRCREV_machine ?= "13ee9d9ef164b9a74f22bc97d1e504afe491134c"
9SRCREV_meta ?= "a2dfb1610d9dad34652a3c27c6c9d8751ed67af6"
10
11# For Crystalforest and Romley
12KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " uio"
13KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " uio"
14
15# Functionality flags
16KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
diff --git a/recipes-kernel/linux/linux-intel_6.6.bb b/recipes-kernel/linux/linux-intel_6.6.bb
new file mode 100644
index 00000000..3b917bfa
--- /dev/null
+++ b/recipes-kernel/linux/linux-intel_6.6.bb
@@ -0,0 +1,21 @@
1require linux-intel.inc
2
3SRC_URI:prepend = "git://github.com/intel/linux-intel-lts.git;protocol=https;name=machine;branch=${KBRANCH}; \
4 "
5KBRANCH = "6.6/linux"
6KMETA_BRANCH = "yocto-6.6"
7
8LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
9
10DEPENDS += "elfutils-native openssl-native util-linux-native"
11
12LINUX_VERSION_EXTENSION ??= "-intel-pk-${LINUX_KERNEL_TYPE}"
13
14LINUX_VERSION ?= "6.6.25"
15SRCREV_machine ?= "lts-v6.6.25-linux-240415T215440Z"
16SRCREV_meta ?= "c3d1322fb6ff68cdcf4d7a3c1140d81bfdc1320a"
17
18# Functionality flags
19KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/security/security.scc"
20
21UPSTREAM_CHECK_GITTAGREGEX = "^lts-(?P<pver>v6.6.(\d+)-linux-(\d+)T(\d+)Z)$"
diff --git a/recipes-kernel/linux/linux-intel_6.8.bb b/recipes-kernel/linux/linux-intel_6.8.bb
new file mode 100644
index 00000000..036879db
--- /dev/null
+++ b/recipes-kernel/linux/linux-intel_6.8.bb
@@ -0,0 +1,20 @@
1require linux-intel.inc
2
3SRC_URI:prepend = "git://github.com/intel/mainline-tracking.git;protocol=https;name=machine;nobranch=1; \
4 "
5KMETA_BRANCH = "master"
6
7LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
8
9DEPENDS += "elfutils-native openssl-native util-linux-native"
10
11LINUX_VERSION_EXTENSION ??= "-mainline-tracking-${LINUX_KERNEL_TYPE}"
12
13LINUX_VERSION ?= "6.8"
14SRCREV_machine ?= "efbae83db36abbbbdb946d4f7bbdfda174107cd2"
15SRCREV_meta ?= "27907f391a4fc508da21358b13419c6e86926c34"
16
17# Functionality flags
18KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/security/security.scc"
19
20UPSTREAM_CHECK_GITTAGREGEX = "^mainline-tracking-v6.7-rc3-linux-(?P<pver>(\d+)T(\d+)Z)$"
diff --git a/recipes-kernel/linux/linux-yocto-dev.bbappend b/recipes-kernel/linux/linux-yocto-dev.bbappend
index 6173148c..deb19940 100644
--- a/recipes-kernel/linux/linux-yocto-dev.bbappend
+++ b/recipes-kernel/linux/linux-yocto-dev.bbappend
@@ -1,21 +1,21 @@
1FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" 1FILESEXTRAPATHS:prepend:intel-x86-common := "${THISDIR}/${PN}:"
2 2
3COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" 3COMPATIBLE_MACHINE:core2-32-intel-common = "${MACHINE}"
4KMACHINE_core2-32-intel-common = "intel-core2-32" 4KMACHINE:core2-32-intel-common = "intel-core2-32"
5KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" 5KERNEL_FEATURES:append:core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}"
6 6
7COMPATIBLE_MACHINE_corei7-64-intel-common = "${MACHINE}" 7COMPATIBLE_MACHINE:corei7-64-intel-common = "${MACHINE}"
8KMACHINE_corei7-64-intel-common = "intel-corei7-64" 8KMACHINE:corei7-64-intel-common = "intel-corei7-64"
9KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" 9KERNEL_FEATURES:append:corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}"
10 10
11# NOTE: We do not set SRCREVs here as -dev is intended to be built with AUTOREV 11# NOTE: We do not set SRCREVs here as -dev is intended to be built with AUTOREV
12# and setting them here breaks the default mechanism to use AUTOREV if the 12# and setting them here breaks the default mechanism to use AUTOREV if the
13# default SRCREV is set and linux-yocto-dev is the preferred provider. 13# default SRCREV is set and linux-yocto-dev is the preferred provider.
14 14
15# For Crystalforest and Romley 15# For Crystalforest and Romley
16KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " uio" 16KERNEL_MODULE_AUTOLOAD:append:core2-32-intel-common = " uio"
17KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " uio" 17KERNEL_MODULE_AUTOLOAD:append:corei7-64-intel-common = " uio"
18 18
19# For FRI2, NUC 19# For FRI2, NUC
20KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " iwlwifi" 20KERNEL_MODULE_AUTOLOAD:append:core2-32-intel-common = " iwlwifi"
21KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " iwlwifi" 21KERNEL_MODULE_AUTOLOAD:append:corei7-64-intel-common = " iwlwifi"
diff --git a/recipes-kernel/linux/linux-yocto-rt_4.12.bbappend b/recipes-kernel/linux/linux-yocto-rt_%.bbappend
index daa7dd6b..daa7dd6b 100644
--- a/recipes-kernel/linux/linux-yocto-rt_4.12.bbappend
+++ b/recipes-kernel/linux/linux-yocto-rt_%.bbappend
diff --git a/recipes-kernel/linux/linux-yocto-rt_4.14.bbappend b/recipes-kernel/linux/linux-yocto-rt_4.14.bbappend
deleted file mode 100644
index daa7dd6b..00000000
--- a/recipes-kernel/linux/linux-yocto-rt_4.14.bbappend
+++ /dev/null
@@ -1 +0,0 @@
1require meta-intel-compat-kernel.inc
diff --git a/recipes-kernel/linux/linux-yocto-rt_4.15.bbappend b/recipes-kernel/linux/linux-yocto-rt_4.15.bbappend
deleted file mode 100644
index daa7dd6b..00000000
--- a/recipes-kernel/linux/linux-yocto-rt_4.15.bbappend
+++ /dev/null
@@ -1 +0,0 @@
1require meta-intel-compat-kernel.inc
diff --git a/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend b/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend
deleted file mode 100644
index e8c27707..00000000
--- a/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend
+++ /dev/null
@@ -1,15 +0,0 @@
1FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:"
2
3KERNEL_FEATURES_INTEL_COMMON ?= ""
4
5COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}"
6COMPATIBLE_MACHINE_corei7-64-intel-common = "${MACHINE}"
7
8KBRANCH_core2-32-intel-common = "standard/tiny/base"
9KBRANCH_corei7-64-intel-common = "standard/tiny/base"
10
11KMACHINE_core2-32-intel-common = "intel-core2-32"
12KMACHINE_corei7-64-intel-common = "intel-corei7-64"
13
14KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON} cfg/fs/ext4.scc"
15KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON} cfg/fs/ext4.scc"
diff --git a/recipes-kernel/linux/linux-yocto_%.bbappend b/recipes-kernel/linux/linux-yocto_%.bbappend
index 7c29be14..9f3d43e3 100644
--- a/recipes-kernel/linux/linux-yocto_%.bbappend
+++ b/recipes-kernel/linux/linux-yocto_%.bbappend
@@ -1,4 +1,6 @@
1require meta-intel-compat-kernel.inc
2
1# The kernel build is 64-bit regardless, so include both common overrides. 3# The kernel build is 64-bit regardless, so include both common overrides.
2# Without this, the kernel will be missing vars that make it buildable for the 4# Without this, the kernel will be missing vars that make it buildable for the
3# intel-corei7-64 machine. 5# intel-corei7-64 machine.
4MACHINEOVERRIDES_prepend_corei7-64-x32-intel-common = "corei7-64-intel-common:" 6MACHINEOVERRIDES:prepend:corei7-64-x32-intel-common = "corei7-64-intel-common:"
diff --git a/recipes-kernel/linux/linux-yocto_4.12.bbappend b/recipes-kernel/linux/linux-yocto_4.12.bbappend
deleted file mode 100644
index daa7dd6b..00000000
--- a/recipes-kernel/linux/linux-yocto_4.12.bbappend
+++ /dev/null
@@ -1 +0,0 @@
1require meta-intel-compat-kernel.inc
diff --git a/recipes-kernel/linux/linux-yocto_4.14.bbappend b/recipes-kernel/linux/linux-yocto_4.14.bbappend
deleted file mode 100644
index daa7dd6b..00000000
--- a/recipes-kernel/linux/linux-yocto_4.14.bbappend
+++ /dev/null
@@ -1 +0,0 @@
1require meta-intel-compat-kernel.inc
diff --git a/recipes-kernel/linux/linux-yocto_4.15.bbappend b/recipes-kernel/linux/linux-yocto_4.15.bbappend
deleted file mode 100644
index daa7dd6b..00000000
--- a/recipes-kernel/linux/linux-yocto_4.15.bbappend
+++ /dev/null
@@ -1 +0,0 @@
1require meta-intel-compat-kernel.inc
diff --git a/recipes-kernel/linux/meta-intel-compat-kernel.inc b/recipes-kernel/linux/meta-intel-compat-kernel.inc
index be5056c2..0c861e13 100644
--- a/recipes-kernel/linux/meta-intel-compat-kernel.inc
+++ b/recipes-kernel/linux/meta-intel-compat-kernel.inc
@@ -3,11 +3,12 @@
3 3
4KERNEL_FEATURES_INTEL_COMMON ?= "" 4KERNEL_FEATURES_INTEL_COMMON ?= ""
5 5
6COMPATIBLE_MACHINE_intel-x86-common = "${MACHINE}" 6COMPATIBLE_MACHINE:intel-x86-common = "${MACHINE}"
7KERNEL_FEATURES_intel-x86-common = "${KERNEL_FEATURES_INTEL_COMMON}" 7KERNEL_FEATURES:intel-x86-common = "${KERNEL_FEATURES_INTEL_COMMON}"
8 8
9KMACHINE_corei7-64-intel-common = "intel-corei7-64" 9KMACHINE:corei7-64-intel-common = "intel-corei7-64"
10KMACHINE_core2-32-intel-common = "intel-core2-32" 10KMACHINE:core2-32-intel-common = "intel-core2-32"
11KMACHINE:x86-64-v3-intel-common = "intel-corei7-64"
11 12
12INTEL_COMMON_AUTOLOAD ?= " uio iwlwifi i915" 13INTEL_COMMON_AUTOLOAD ?= " uio iwlwifi i915"
13KERNEL_MODULE_AUTOLOAD_intel-x86-common = " ${INTEL_COMMON_AUTOLOAD}" 14KERNEL_MODULE_AUTOLOAD:intel-x86-common = " ${INTEL_COMMON_AUTOLOAD}"
diff --git a/recipes-kernel/lttng/lttng-modules/0002-lttng-modules-PKT-4.9-yocto-build-failed.patch b/recipes-kernel/lttng/lttng-modules/0002-lttng-modules-PKT-4.9-yocto-build-failed.patch
deleted file mode 100644
index 32b49b8d..00000000
--- a/recipes-kernel/lttng/lttng-modules/0002-lttng-modules-PKT-4.9-yocto-build-failed.patch
+++ /dev/null
@@ -1,38 +0,0 @@
1From ebfdc8b8af17f9cf23c6878eb52476fde7b48e5c Mon Sep 17 00:00:00 2001
2From: Priyalee Kushwaha <priyalee.kushwaha@intel.com>
3Date: Fri, 22 Sep 2017 14:40:57 -0700
4Subject: [PATCH] lttng-modules: PKT 4.9 yocto build failed
5
6PKT 4.9 yocto kernel backports a patch from upstream and that
7changes header include/linux/ktimer.h. Since this backported
8patch is only relevant for PKT kernel, we need to carry this
9patch.
10
11Upstream-Status: Backport
12Signed-off-by: Kushwaha, Priyalee <priyalee.kushwaha@intel.com>
13---
14 instrumentation/events/lttng-module/timer.h | 6 +++---
15 1 file changed, 3 insertions(+), 3 deletions(-)
16
17diff --git a/instrumentation/events/lttng-module/timer.h b/instrumentation/events/lttng-module/timer.h
18index d62fd25..59da988 100644
19--- a/instrumentation/events/lttng-module/timer.h
20+++ b/instrumentation/events/lttng-module/timer.h
21@@ -16,11 +16,11 @@ struct timer_list;
22
23 #endif /* _TRACE_TIMER_DEF_ */
24
25-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
26+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0))
27 #define lttng_ktime_get_tv64(kt) (kt)
28-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
29+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)) */
30 #define lttng_ktime_get_tv64(kt) ((kt).tv64)
31-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */
32+#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)) */
33
34 LTTNG_TRACEPOINT_EVENT_CLASS(timer_class,
35
36--
372.7.4
38
diff --git a/recipes-kernel/lttng/lttng-modules_%.bbappend b/recipes-kernel/lttng/lttng-modules_%.bbappend
deleted file mode 100644
index dc1c4a74..00000000
--- a/recipes-kernel/lttng/lttng-modules_%.bbappend
+++ /dev/null
@@ -1,7 +0,0 @@
1FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:"
2
3
4LTTNG_PATCH = "${@bb.utils.contains_any('PREFERRED_PROVIDER_virtual/kernel','linux-intel linux-intel-rt','file://0002-lttng-modules-PKT-4.9-yocto-build-failed.patch','',d)}"
5
6SRC_URI_append_intel-x86-common = " ${LTTNG_PATCH}"
7
diff --git a/recipes-multimedia/itt/itt_3.24.6.bb b/recipes-multimedia/itt/itt_3.24.6.bb
new file mode 100644
index 00000000..1c4759f9
--- /dev/null
+++ b/recipes-multimedia/itt/itt_3.24.6.bb
@@ -0,0 +1,39 @@
1SUMMARY = "Intel® Instrumentation and Tracing Technology (ITT) and Just-In-Time (JIT) API"
2DESCRIPTION = "The Instrumentation and Tracing Technology (ITT) API enables \
3application to generate and control the collection of trace data during its \
4execution across different Intel tools."
5
6LICENSE = "BSD-3-Clause & GPL-2.0-only"
7LIC_FILES_CHKSUM = "file://LICENSES/BSD-3-Clause.txt;md5=c551872bcf41ce707df54c722edeca7b \
8 file://LICENSES/GPL-2.0-only.txt;md5=e2d76e7801260c21b90eea3605508ad6 \
9 "
10
11SRC_URI = "git://github.com/intel/ittapi.git;protocol=https;branch=master"
12SRCREV = "ec077431fc725dba590b09b2cec5137878b14783"
13S = "${WORKDIR}/git"
14PE = "1"
15
16UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>(\d+(\.\d+)+))$"
17
18COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
19
20inherit pkgconfig cmake
21
22EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=Release"
23EXTRA_OECMAKE += "${@oe.utils.conditional('TARGET_ARCH','x86_64','','-DFORCE_32=ON',d)}"
24
25do_install() {
26 install -d -m 755 ${D}${libdir} ${D}${includedir}/ittnotify
27 install -m 644 ${B}/bin/*.a ${D}${libdir}
28 cp -r ${S}/include/* ${D}${includedir}/ittnotify
29 cp -r ${S}/src/ittnotify/*.h ${D}${includedir}/ittnotify
30 rm -r ${D}${includedir}/ittnotify/fortran/win32
31 if [ "${TARGET_ARCH}" = "x86_64" ]; then
32 rm -r ${D}${includedir}/ittnotify/fortran/posix/x86
33 else
34 rm -r ${D}${includedir}/ittnotify/fortran/posix/x86_64
35 fi
36
37}
38
39RDEPENDS:${PN}-dev:remove = "${PN} (= ${EXTENDPKGV})"
diff --git a/recipes-multimedia/libva/files/0001-Disable-vp9-padding-on-mtl.patch b/recipes-multimedia/libva/files/0001-Disable-vp9-padding-on-mtl.patch
new file mode 100644
index 00000000..90dff8d1
--- /dev/null
+++ b/recipes-multimedia/libva/files/0001-Disable-vp9-padding-on-mtl.patch
@@ -0,0 +1,35 @@
1From 1b303f417113ad1aa6b63fc024fbe4aa0c943f57 Mon Sep 17 00:00:00 2001
2From: Lim Siew Hoon <siew.hoon.lim@intel.com>
3Date: Tue, 5 Sep 2023 16:13:42 +0800
4Subject: [PATCH 01/12] Disable vp9 padding on mtl.
5
6Upstream-Status: Submitted [https://github.com/intel/media-driver/pull/1720]
7
8Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
9---
10 media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp | 4 ++--
11 1 file changed, 2 insertions(+), 2 deletions(-)
12
13diff --git a/media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp b/media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp
14index 844545a87..72265289c 100644
15--- a/media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp
16+++ b/media_softlet/linux/Xe_M_plus/ddi/media_sku_wa_mtl.cpp
17@@ -284,7 +284,7 @@ static bool InitMtlMediaWaExt(struct GfxDeviceInfo *devInfo,
18
19 MEDIA_WR_WA(waTable, WaDisableSetObjectCapture, 1);
20
21- MEDIA_WR_WA(waTable, Wa_Vp9UnalignedHeight, 1);
22+ MEDIA_WR_WA(waTable, Wa_Vp9UnalignedHeight, 0);
23
24 MEDIA_WR_WA(waTable, Wa_15013355402, 1);
25
26@@ -337,4 +337,4 @@ static struct LinuxDeviceInit arlDeviceInit =
27 };
28
29 static bool arlDeviceRegister = DeviceInfoFactory<LinuxDeviceInit>::
30- RegisterDevice((uint32_t)IGFX_ARROWLAKE, &arlDeviceInit);
31\ No newline at end of file
32+ RegisterDevice((uint32_t)IGFX_ARROWLAKE, &arlDeviceInit);
33--
342.40.1
35
diff --git a/recipes-multimedia/libva/files/0002-Force-ARGB-surface-to-tile4-for-ACM.patch b/recipes-multimedia/libva/files/0002-Force-ARGB-surface-to-tile4-for-ACM.patch
new file mode 100644
index 00000000..df3d9805
--- /dev/null
+++ b/recipes-multimedia/libva/files/0002-Force-ARGB-surface-to-tile4-for-ACM.patch
@@ -0,0 +1,44 @@
1From 1580f01ec5ad5afdad58c39dded999494275be10 Mon Sep 17 00:00:00 2001
2From: Lim Siew Hoon <siew.hoon.lim@intel.com>
3Date: Wed, 11 Oct 2023 15:36:21 +0800
4Subject: [PATCH 02/12] Force ARGB surface to tile4 for ACM
5
6Upstream-Status: Submitted [https://github.com/intel/media-driver/pull/1728]
7
8Signed-off-by: Soon, Thean Siew <thean.siew.soon@intel.com>
9Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
10---
11 media_driver/linux/common/ddi/media_libva_util.cpp | 10 ++++++++++
12 1 file changed, 10 insertions(+)
13
14diff --git a/media_driver/linux/common/ddi/media_libva_util.cpp b/media_driver/linux/common/ddi/media_libva_util.cpp
15index 63c173419..73be76366 100755
16--- a/media_driver/linux/common/ddi/media_libva_util.cpp
17+++ b/media_driver/linux/common/ddi/media_libva_util.cpp
18@@ -504,6 +504,7 @@ VAStatus DdiMediaUtil_AllocateSurface(
19 gmmCustomParams.Flags.Gpu.UnifiedAuxSurface = 0;
20 }
21 }
22+
23 break;
24 case TILING_X:
25 gmmCustomParams.Flags.Info.TiledX = true;
26@@ -685,6 +686,15 @@ VAStatus DdiMediaUtil_AllocateSurface(
27 }
28 }
29 }
30+ // There's no VAAPI interface for modifier query yet. As a workaround, always allocate
31+ // RGB surface as tile4.
32+ if ((format == Media_Format_A8R8G8B8 ||
33+ format == Media_Format_B10G10R10A2 |
34+ format == Media_Format_A8B8G8R8 ||
35+ format == Media_Format_X8R8G8B8) && !MEDIA_IS_SKU(&mediaDrvCtx->SkuTable, FtrTileY))
36+ {
37+ gmmParams.Flags.Info.Tile4 = true;
38+ }
39 break;
40 case TILING_X:
41 gmmParams.Flags.Info.TiledX = true;
42--
432.40.1
44
diff --git a/recipes-multimedia/libva/files/0004-Add-device-ID-for-ARL.patch b/recipes-multimedia/libva/files/0004-Add-device-ID-for-ARL.patch
new file mode 100644
index 00000000..59fff127
--- /dev/null
+++ b/recipes-multimedia/libva/files/0004-Add-device-ID-for-ARL.patch
@@ -0,0 +1,45 @@
1From bb860c0bfe53060925b1dce50da4e6e94cfc8cae Mon Sep 17 00:00:00 2001
2From: huangli2018 <li.h.huang@intel.com>
3Date: Wed, 20 Dec 2023 15:47:43 +0800
4Subject: [PATCH 04/13] Add device ID for ARL
5
6Add device ID for ARL
7
8Upstream-Status: Backport [https://github.com/intel/media-driver/commit/95cbfce81cafa3c24d9d4601d41a855093bc51fb]
9Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
10---
11 .../linux/Xe_M_plus/ddi/media_sysinfo_mtl.cpp | 13 +++++++++++--
12 1 file changed, 11 insertions(+), 2 deletions(-)
13
14diff --git a/media_softlet/linux/Xe_M_plus/ddi/media_sysinfo_mtl.cpp b/media_softlet/linux/Xe_M_plus/ddi/media_sysinfo_mtl.cpp
15index 426bd795f..7b73dfaff 100644
16--- a/media_softlet/linux/Xe_M_plus/ddi/media_sysinfo_mtl.cpp
17+++ b/media_softlet/linux/Xe_M_plus/ddi/media_sysinfo_mtl.cpp
18@@ -1,6 +1,6 @@
19 /*===================== begin_copyright_notice ==================================
20
21-Copyright (c) 2022, Intel Corporation
22+Copyright (c) 2023, Intel Corporation
23
24 Permission is hereby granted, free of charge, to any person obtaining a
25 copy of this software and associated documentation files (the "Software"),
26@@ -218,4 +218,13 @@ static struct GfxDeviceInfo arlInfo = {
27 };
28
29 static bool arlsDevice7d67 = DeviceInfoFactory<GfxDeviceInfo>::
30- RegisterDevice(0x7D67, &arlInfo);
31\ No newline at end of file
32+ RegisterDevice(0x7D67, &arlInfo);
33+
34+static bool arlhDevice7d51 = DeviceInfoFactory<GfxDeviceInfo>::
35+ RegisterDevice(0x7D51, &arlInfo);
36+
37+static bool arlhDevice7dd1 = DeviceInfoFactory<GfxDeviceInfo>::
38+ RegisterDevice(0x7DD1, &arlInfo);
39+
40+static bool arlhDevice7d41 = DeviceInfoFactory<GfxDeviceInfo>::
41+ RegisterDevice(0x7D41, &arlInfo);
42\ No newline at end of file
43--
442.40.1
45
diff --git a/recipes-multimedia/libva/files/0005-Add-XR24-support-to-DMABuf.patch b/recipes-multimedia/libva/files/0005-Add-XR24-support-to-DMABuf.patch
new file mode 100644
index 00000000..a9cd2317
--- /dev/null
+++ b/recipes-multimedia/libva/files/0005-Add-XR24-support-to-DMABuf.patch
@@ -0,0 +1,34 @@
1From bbd3af94a6146d702909ff7e25b0c0547ecbb895 Mon Sep 17 00:00:00 2001
2From: jlui <jonathan.ming.jun.lui@intel.com>
3Date: Wed, 15 Nov 2023 10:48:34 +0800
4Subject: [PATCH 05/13] Add XR24 support to DMABuf
5
6This is to enable XR24/BGRX support for DMABuf
7
8Signed-off-by: Lui, Jonathan Ming Jun <jonathan.ming.jun.lui@intel.com>
9
10Upstream-Status: Backport [https://github.com/intel/media-driver/commit/3910b7029f5416fd0b5972f940c65d0a82c48c7b]
11
12Signed-off-by: Lim, Siew Hoon <siew.hoon.lim@intel.com>
13---
14 .../vp/ddi/capstable_data_vp_xe_lpm_plus_r0_specific.h | 3 ++-
15 1 file changed, 2 insertions(+), 1 deletion(-)
16
17diff --git a/media_softlet/linux/xe_lpm_plus_r0/vp/ddi/capstable_data_vp_xe_lpm_plus_r0_specific.h b/media_softlet/linux/xe_lpm_plus_r0/vp/ddi/capstable_data_vp_xe_lpm_plus_r0_specific.h
18index fdcca8873..2dcf440a4 100644
19--- a/media_softlet/linux/xe_lpm_plus_r0/vp/ddi/capstable_data_vp_xe_lpm_plus_r0_specific.h
20+++ b/media_softlet/linux/xe_lpm_plus_r0/vp/ddi/capstable_data_vp_xe_lpm_plus_r0_specific.h
21@@ -55,8 +55,9 @@ static ProfileSurfaceAttribInfo surfaceAttribInfo_VAEntrypointVideoProc_VAProfil
22 {VASurfaceAttribPixelFormat, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, {VA_FOURCC('4', '2', '2', 'V')}}},
23 {VASurfaceAttribPixelFormat, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, {VA_FOURCC('R', 'G', 'B', 'A')}}},
24 {VASurfaceAttribPixelFormat, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, {VA_FOURCC('B', 'G', 'R', 'A')}}},
25- {VASurfaceAttribPixelFormat, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, { VA_FOURCC('R', 'G', 'B', 'P')}}},
26+ {VASurfaceAttribPixelFormat, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, {VA_FOURCC('R', 'G', 'B', 'P')}}},
27 {VASurfaceAttribPixelFormat, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, {VA_FOURCC('R', 'G', 'B', 'X')}}},
28+ {VASurfaceAttribPixelFormat, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, {VA_FOURCC('X', 'R', 'G', 'B')}}},
29 {VASurfaceAttribPixelFormat, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, {VA_FOURCC('P', '0', '1', '0')}}},
30 {VASurfaceAttribPixelFormat, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, {VA_FOURCC('R', 'G', '2', '4')}}},
31 {VASurfaceAttribPixelFormat, VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE, {VAGenericValueTypeInteger, {VA_FOURCC_ARGB}}},
32--
332.40.1
34
diff --git a/recipes-multimedia/libva/files/0006-add-INTEL-MEDIA-ALLOC-refineE-to-specify-the-memory-.patch b/recipes-multimedia/libva/files/0006-add-INTEL-MEDIA-ALLOC-refineE-to-specify-the-memory-.patch
new file mode 100644
index 00000000..5b04201a
--- /dev/null
+++ b/recipes-multimedia/libva/files/0006-add-INTEL-MEDIA-ALLOC-refineE-to-specify-the-memory-.patch
@@ -0,0 +1,214 @@
1From 67fb6128adf8fc03d429393e98f0982b42a40e64 Mon Sep 17 00:00:00 2001
2From: Zhang_Xinfeng <carl.zhang@intel.com>
3Date: Wed, 27 Dec 2023 09:59:29 +0800
4Subject: [PATCH 06/12] add INTEL MEDIA ALLOC refineE to specify the memory
5 alignment
6
7this key is used to allocate bigger pages
8env variable INTEL_MEDIA_ALLOC_refineE also could be used
9and was not enabled by default
10mode 0 is default mode
11mode 1 is < 64 align to 64
12mode 2 is > 1M && <= 3M align to 1M, >3M align to 2M
13mode 3 is mode 1 & mode 2
14
15Upstream-Status: Backport [https://github.com/intel/media-driver/commit/765dd939dcc5562d18cca18e5eda505bda952797]
16Signed-off-by: Lim, Siew Hoon <siew.hoon.lim@intel.com>
17---
18 .../linux/common/os/i915/mos_bufmgr.c | 75 +++++++++++++++----
19 .../common/os/i915_production/mos_bufmgr.c | 1 +
20 .../common/os/mos_context_specific_next.cpp | 21 +++++-
21 .../common/os/mos_user_setting_specific.cpp | 7 ++
22 4 files changed, 90 insertions(+), 14 deletions(-)
23
24diff --git a/media_softlet/linux/common/os/i915/mos_bufmgr.c b/media_softlet/linux/common/os/i915/mos_bufmgr.c
25index c0b3ba027..b623d0129 100644
26--- a/media_softlet/linux/common/os/i915/mos_bufmgr.c
27+++ b/media_softlet/linux/common/os/i915/mos_bufmgr.c
28@@ -138,7 +138,7 @@ struct mos_bufmgr_gem {
29 int exec_count;
30
31 /** Array of lists of cached gem objects of power-of-two sizes */
32- struct mos_gem_bo_bucket cache_bucket[14 * 4];
33+ struct mos_gem_bo_bucket cache_bucket[64];
34 int num_buckets;
35 time_t time;
36
37@@ -3852,9 +3852,9 @@ add_bucket(struct mos_bufmgr_gem *bufmgr_gem, int size)
38 }
39
40 static void
41-init_cache_buckets(struct mos_bufmgr_gem *bufmgr_gem)
42+init_cache_buckets(struct mos_bufmgr_gem *bufmgr_gem, uint8_t alloc_mode)
43 {
44- unsigned long size, cache_max_size = 64 * 1024 * 1024;
45+ unsigned long size, cache_max_size = 64 * 1024 * 1024, unit_size;
46
47 /* OK, so power of two buckets was too wasteful of memory.
48 * Give 3 other sizes between each power of two, to hopefully
49@@ -3864,17 +3864,63 @@ init_cache_buckets(struct mos_bufmgr_gem *bufmgr_gem)
50 * width/height alignment and rounding of sizes to pages will
51 * get us useful cache hit rates anyway)
52 */
53- add_bucket(bufmgr_gem, 4096);
54- add_bucket(bufmgr_gem, 4096 * 2);
55- add_bucket(bufmgr_gem, 4096 * 3);
56+ /* alloc_mode 0 is default alloc_mode
57+ * alloc_mode 1 rounding up to 64K for all < 1M
58+ * alloc_mode 2 rounding up to 2M for size> 1M
59+ * alloc_mode 3 rounding up to 2M for size > 1M and 64K for size <= 1M */
60+ if( alloc_mode > 3 )
61+ alloc_mode = 0;
62+
63+ if ( 0 == alloc_mode || 2 == alloc_mode)
64+ {
65+ // < 1M normal alloc_mode
66+ add_bucket(bufmgr_gem, 4096);
67+ add_bucket(bufmgr_gem, 4096 * 2);
68+ add_bucket(bufmgr_gem, 4096 * 3);
69+ /* Initialize the linked lists for BO reuse cache. */
70+ for (size = 4 * 4096; size < 1024 * 1024; size *= 2) {
71+ add_bucket(bufmgr_gem, size);
72+ add_bucket(bufmgr_gem, size + size * 1 / 4);
73+ add_bucket(bufmgr_gem, size + size * 2 / 4);
74+ add_bucket(bufmgr_gem, size + size * 3 / 4);
75+ }
76
77- /* Initialize the linked lists for BO reuse cache. */
78- for (size = 4 * 4096; size <= cache_max_size; size *= 2) {
79- add_bucket(bufmgr_gem, size);
80+ add_bucket(bufmgr_gem, 1024 * 1024);
81+ }
82+ if (1 == alloc_mode || 3 == alloc_mode)
83+ {
84+ // < 1M 64k alignment
85+ unit_size = 64 * 1024;
86+ for (size = unit_size; size <= 1024 * 1024; size += unit_size)
87+ {
88+ add_bucket(bufmgr_gem, size);
89+ }
90+ }
91+ if( 0 == alloc_mode || 1 == alloc_mode)
92+ {
93+ //> 1M is normal alloc_mode
94+ add_bucket(bufmgr_gem, 1280 * 1024);
95+ add_bucket(bufmgr_gem, 1536 * 1024);
96+ add_bucket(bufmgr_gem, 1792 * 1024);
97+
98+ for (size = 2 * 1024 * 1024; size < cache_max_size; size *= 2) {
99+ add_bucket(bufmgr_gem, size);
100+ add_bucket(bufmgr_gem, size + size * 1 / 4);
101+ add_bucket(bufmgr_gem, size + size * 2 / 4);
102+ add_bucket(bufmgr_gem, size + size * 3 / 4);
103+ }
104+ }
105+ if( 2 == alloc_mode || 3 == alloc_mode)
106+ {
107+ //> 1M rolling to 2M
108+ unit_size = 2 * 1024 * 1024;
109+ add_bucket(bufmgr_gem, unit_size);
110+ add_bucket(bufmgr_gem, 3 * 1024 * 1024);
111
112- add_bucket(bufmgr_gem, size + size * 1 / 4);
113- add_bucket(bufmgr_gem, size + size * 2 / 4);
114- add_bucket(bufmgr_gem, size + size * 3 / 4);
115+ for (size = 4 * 1024 * 1024; size <= cache_max_size; size += unit_size)
116+ {
117+ add_bucket(bufmgr_gem, size);
118+ }
119 }
120 }
121
122@@ -5100,6 +5146,7 @@ mos_bufmgr_gem_init_i915(int fd, int batch_size)
123 struct drm_i915_gem_get_aperture aperture;
124 drm_i915_getparam_t gp;
125 int ret, tmp;
126+ uint8_t alloc_mode;
127 bool exec2 = false;
128
129 pthread_mutex_lock(&bufmgr_list_mutex);
130@@ -5352,10 +5399,12 @@ mos_bufmgr_gem_init_i915(int fd, int batch_size)
131 *
132 * Every 4 was too few for the blender benchmark.
133 */
134+ alloc_mode = (uint8_t)(batch_size & 0xff);
135+ batch_size &= 0xffffff00;
136 bufmgr_gem->max_relocs = batch_size / sizeof(uint32_t) / 2 - 2;
137
138 DRMINITLISTHEAD(&bufmgr_gem->named);
139- init_cache_buckets(bufmgr_gem);
140+ init_cache_buckets(bufmgr_gem,alloc_mode);
141
142 DRMLISTADD(&bufmgr_gem->managers, &bufmgr_list);
143
144diff --git a/media_softlet/linux/common/os/i915_production/mos_bufmgr.c b/media_softlet/linux/common/os/i915_production/mos_bufmgr.c
145index 90b5685b1..b3574f7d3 100644
146--- a/media_softlet/linux/common/os/i915_production/mos_bufmgr.c
147+++ b/media_softlet/linux/common/os/i915_production/mos_bufmgr.c
148@@ -5403,6 +5403,7 @@ mos_bufmgr_gem_init_i915(int fd, int batch_size)
149 *
150 * Every 4 was too few for the blender benchmark.
151 */
152+ batch_size &= 0xffffff00;
153 bufmgr_gem->max_relocs = batch_size / sizeof(uint32_t) / 2 - 2;
154
155 DRMINITLISTHEAD(&bufmgr_gem->named);
156diff --git a/media_softlet/linux/common/os/mos_context_specific_next.cpp b/media_softlet/linux/common/os/mos_context_specific_next.cpp
157index 9e9e3ff7e..543e262d1 100644
158--- a/media_softlet/linux/common/os/mos_context_specific_next.cpp
159+++ b/media_softlet/linux/common/os/mos_context_specific_next.cpp
160@@ -64,6 +64,7 @@ MOS_STATUS OsContextSpecificNext::Init(DDI_DEVICE_CONTEXT ddiDriverContext)
161 uint32_t iDeviceId = 0;
162 MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
163 uint32_t value = 0;
164+ uint32_t mode = 0;
165 MediaUserSettingSharedPtr userSettingPtr = nullptr;
166
167 MOS_OS_FUNCTION_ENTER;
168@@ -89,7 +90,25 @@ MOS_STATUS OsContextSpecificNext::Init(DDI_DEVICE_CONTEXT ddiDriverContext)
169
170 userSettingPtr = MosInterface::MosGetUserSettingInstance(osDriverContext);
171
172- m_bufmgr = mos_bufmgr_gem_init(m_fd, BATCH_BUFFER_SIZE, &m_deviceType);
173+ mode = BATCH_BUFFER_SIZE;
174+ ReadUserSetting(
175+ userSettingPtr,
176+ value,
177+ "INTEL MEDIA ALLOC MODE",
178+ MediaUserSetting::Group::Device);
179+
180+ if (value)
181+ {
182+ mode |= (value & 0x000000ff);
183+ }
184+ value = 0;
185+ /* no need to set batch buffer size after switch to softpin
186+ * keep it, just for test during relocation to softpin transition
187+ * now , it could be a debug method , but is actually useless
188+ * so it is safe to reuse the lowest 8bit to convey addtional information
189+ * more suitable solution is deleting it , or add additional parameter*/
190+
191+ m_bufmgr = mos_bufmgr_gem_init(m_fd, (int)mode, &m_deviceType);
192 if (nullptr == m_bufmgr)
193 {
194 MOS_OS_ASSERTMESSAGE("Not able to allocate buffer manager, fd=0x%d", m_fd);
195diff --git a/media_softlet/linux/common/os/mos_user_setting_specific.cpp b/media_softlet/linux/common/os/mos_user_setting_specific.cpp
196index 6be8b4298..caed584f4 100644
197--- a/media_softlet/linux/common/os/mos_user_setting_specific.cpp
198+++ b/media_softlet/linux/common/os/mos_user_setting_specific.cpp
199@@ -52,5 +52,12 @@ MOS_STATUS MosUserSetting::InitMosUserSettingSpecific(MediaUserSettingSharedPtr
200 0,
201 true); //"Enable VM Bind."
202
203+ DeclareUserSettingKey(
204+ userSettingPtr,
205+ "INTEL MEDIA ALLOC MODE",
206+ MediaUserSetting::Group::Device,
207+ 0,
208+ false); //
209+
210 return MOS_STATUS_SUCCESS;
211 }
212--
2132.40.1
214
diff --git a/recipes-multimedia/libva/files/0007-Skip-report-keys.patch b/recipes-multimedia/libva/files/0007-Skip-report-keys.patch
new file mode 100644
index 00000000..459ff490
--- /dev/null
+++ b/recipes-multimedia/libva/files/0007-Skip-report-keys.patch
@@ -0,0 +1,78 @@
1From b1aebef4d342c77fc2b9c5efbf20aeb2aa9d634e Mon Sep 17 00:00:00 2001
2From: Wang_Pingli <pingli.wang@intel.com>
3Date: Thu, 28 Dec 2023 16:44:40 +0800
4Subject: [PATCH 07/12] Skip report keys
5
6Skip to report keys
7
8Upstream-Status: Backport [https://github.com/intel/media-driver/commit/68ce25b0a6fa90614eb4734c8680aa4e149e8323]
9Signed-off-by: Lim, Siew Hoon <siew.hoon.lim@intel.com>
10---
11 .../os/osservice/mos_utilities_specific.cpp | 30 +++++++++++++++++--
12 1 file changed, 28 insertions(+), 2 deletions(-)
13
14diff --git a/media_softlet/linux/common/os/osservice/mos_utilities_specific.cpp b/media_softlet/linux/common/os/osservice/mos_utilities_specific.cpp
15index b5df29f06..96785e21e 100644
16--- a/media_softlet/linux/common/os/osservice/mos_utilities_specific.cpp
17+++ b/media_softlet/linux/common/os/osservice/mos_utilities_specific.cpp
18@@ -67,6 +67,8 @@ int32_t g_mosMemoryFailSimulateAllocCounter = 0;
19 int32_t *MosUtilities::m_mosAllocMemoryFailSimulateAllocCounter = &g_mosMemoryFailSimulateAllocCounter;
20 #endif
21
22+static bool s_skipToReportReg = false;
23+
24 double MosUtilities::MosGetTime()
25 {
26 struct timespec ts = {};
27@@ -1551,6 +1553,10 @@ MOS_STATUS MosUtilities::MosInitializeReg(RegBufferMap &regBufferMap)
28 {
29 std::string id = "";
30
31+ static const char *disableReportRegKeyList[] = {
32+ "INTEL MEDIA ALLOC MODE"
33+ };
34+ static const uint32_t disableReportRegKeyListCount = sizeof(disableReportRegKeyList) / sizeof(disableReportRegKeyList[0]);
35 while(!regStream.eof())
36 {
37 std::string line = "";
38@@ -1585,8 +1591,22 @@ MOS_STATUS MosUtilities::MosInitializeReg(RegBufferMap &regBufferMap)
39 {
40 std::string name = line.substr(0,pos);
41 std::string value = line.substr(pos+1);
42- auto &keys = regBufferMap[id];
43- keys[name] = value;
44+ if (name.size() > 0 && value.size() > 0)
45+ {
46+ auto &keys = regBufferMap[id];
47+ keys[name] = value;
48+ if (s_skipToReportReg == false && id == USER_SETTING_CONFIG_PATH)
49+ {
50+ for (uint32_t i = 0; i < disableReportRegKeyListCount; i++)
51+ {
52+ if (strcmp(name.c_str(), disableReportRegKeyList[i]) == 0)
53+ {
54+ s_skipToReportReg = true;
55+ break;
56+ }
57+ }
58+ }
59+ }
60 }
61 }
62 }
63@@ -1606,6 +1626,12 @@ MOS_STATUS MosUtilities::MosInitializeReg(RegBufferMap &regBufferMap)
64 MOS_STATUS MosUtilities::MosUninitializeReg(RegBufferMap &regBufferMap)
65 {
66 MOS_STATUS status = MOS_STATUS_SUCCESS;
67+
68+ if (s_skipToReportReg)
69+ {
70+ return MOS_STATUS_SUCCESS;
71+ }
72+
73 if (regBufferMap.size() == 0)
74 {
75 return MOS_STATUS_SUCCESS;
76--
772.40.1
78
diff --git a/recipes-multimedia/libva/files/0008-Limit-INTEL-MEDIA-ALLOC-MODE-to-MTL-and-ARL-only.patch b/recipes-multimedia/libva/files/0008-Limit-INTEL-MEDIA-ALLOC-MODE-to-MTL-and-ARL-only.patch
new file mode 100644
index 00000000..ece5e00b
--- /dev/null
+++ b/recipes-multimedia/libva/files/0008-Limit-INTEL-MEDIA-ALLOC-MODE-to-MTL-and-ARL-only.patch
@@ -0,0 +1,255 @@
1From ac2ffac8d4aade216cc361c6c7120c13a8780719 Mon Sep 17 00:00:00 2001
2From: "Soon, Thean Siew" <thean.siew.soon@intel.com>
3Date: Thu, 28 Dec 2023 18:42:59 +0000
4Subject: [PATCH 08/12] Limit INTEL MEDIA ALLOC MODE to MTL and ARL only
5
6Upstream-Status: Submitted [https://github.com/intel/media-driver/pull/1754]
7
8Signed-off-by: Soon, Thean Siew <thean.siew.soon@intel.com>
9---
10 .../common/os/i915/include/mos_bufmgr_api.h | 1 +
11 .../common/os/i915/include/mos_bufmgr_priv.h | 2 +-
12 .../linux/common/os/i915/mos_bufmgr.c | 69 +++++++++++++++----
13 .../linux/common/os/i915/mos_bufmgr_api.c | 19 +++++
14 .../os/i915_production/mos_bufmgr_priv.h | 1 +
15 .../common/os/mos_context_specific_next.cpp | 36 +++++-----
16 6 files changed, 94 insertions(+), 34 deletions(-)
17
18diff --git a/media_softlet/linux/common/os/i915/include/mos_bufmgr_api.h b/media_softlet/linux/common/os/i915/include/mos_bufmgr_api.h
19index 71cc01099..ab4f1ba89 100644
20--- a/media_softlet/linux/common/os/i915/include/mos_bufmgr_api.h
21+++ b/media_softlet/linux/common/os/i915/include/mos_bufmgr_api.h
22@@ -299,6 +299,7 @@ void mos_bufmgr_enable_vmbind(struct mos_bufmgr *bufmgr);
23 void mos_bufmgr_disable_object_capture(struct mos_bufmgr *bufmgr);
24 int mos_bufmgr_get_memory_info(struct mos_bufmgr *bufmgr, char *info, uint32_t length);
25 int mos_bufmgr_get_devid(struct mos_bufmgr *bufmgr);
26+void mos_bufmgr_realloc_cache(struct mos_bufmgr *bufmgr, uint8_t alloc_mode);
27
28 int mos_bo_map_unsynchronized(struct mos_linux_bo *bo);
29 int mos_bo_map_gtt(struct mos_linux_bo *bo);
30diff --git a/media_softlet/linux/common/os/i915/include/mos_bufmgr_priv.h b/media_softlet/linux/common/os/i915/include/mos_bufmgr_priv.h
31index 63f69f985..6fd58f827 100644
32--- a/media_softlet/linux/common/os/i915/include/mos_bufmgr_priv.h
33+++ b/media_softlet/linux/common/os/i915/include/mos_bufmgr_priv.h
34@@ -358,9 +358,9 @@ struct mos_bufmgr {
35 void (*disable_object_capture)(struct mos_bufmgr *bufmgr) = nullptr;
36 int (*get_memory_info)(struct mos_bufmgr *bufmgr, char *info, uint32_t length) = nullptr;
37 int (*get_devid)(struct mos_bufmgr *bufmgr) = nullptr;
38+ void (*realloc_cache)(struct mos_bufmgr *bufmgr, uint8_t alloc_mode) = nullptr;
39 int (*query_engines_count)(struct mos_bufmgr *bufmgr,
40 unsigned int *nengine) = nullptr;
41-
42 int (*query_engines)(struct mos_bufmgr *bufmgr,
43 __u16 engine_class,
44 __u64 caps,
45diff --git a/media_softlet/linux/common/os/i915/mos_bufmgr.c b/media_softlet/linux/common/os/i915/mos_bufmgr.c
46index b623d0129..2814ddbb7 100644
47--- a/media_softlet/linux/common/os/i915/mos_bufmgr.c
48+++ b/media_softlet/linux/common/os/i915/mos_bufmgr.c
49@@ -2426,19 +2426,9 @@ mos_gem_bo_start_gtt_access(struct mos_linux_bo *bo, int write_enable)
50 }
51
52 static void
53-mos_bufmgr_gem_destroy(struct mos_bufmgr *bufmgr)
54+mos_bufmgr_cleanup_cache(struct mos_bufmgr_gem *bufmgr_gem)
55 {
56- struct mos_bufmgr_gem *bufmgr_gem = (struct mos_bufmgr_gem *) bufmgr;
57- struct drm_gem_close close_bo;
58- int i, ret;
59-
60- free(bufmgr_gem->exec2_objects);
61- free(bufmgr_gem->exec_objects);
62- free(bufmgr_gem->exec_bos);
63- pthread_mutex_destroy(&bufmgr_gem->lock);
64-
65- /* Free any cached buffer objects we were going to reuse */
66- for (i = 0; i < bufmgr_gem->num_buckets; i++) {
67+ for (int i = 0; i < bufmgr_gem->num_buckets; i++) {
68 struct mos_gem_bo_bucket *bucket =
69 &bufmgr_gem->cache_bucket[i];
70 struct mos_bo_gem *bo_gem;
71@@ -2450,7 +2440,25 @@ mos_bufmgr_gem_destroy(struct mos_bufmgr *bufmgr)
72
73 mos_gem_bo_free(&bo_gem->bo);
74 }
75+ bufmgr_gem->cache_bucket[i].size = 0;
76 }
77+ bufmgr_gem->num_buckets = 0;
78+}
79+
80+static void
81+mos_bufmgr_gem_destroy(struct mos_bufmgr *bufmgr)
82+{
83+ struct mos_bufmgr_gem *bufmgr_gem = (struct mos_bufmgr_gem *)bufmgr;
84+ struct drm_gem_close close_bo;
85+ int ret;
86+
87+ free(bufmgr_gem->exec2_objects);
88+ free(bufmgr_gem->exec_objects);
89+ free(bufmgr_gem->exec_bos);
90+ pthread_mutex_destroy(&bufmgr_gem->lock);
91+
92+ /* Free any cached buffer objects we were going to reuse */
93+ mos_bufmgr_cleanup_cache(bufmgr_gem);
94
95 /* Release userptr bo kept hanging around for optimisation. */
96 if (bufmgr_gem->userptr_active.ptr) {
97@@ -3852,9 +3860,41 @@ add_bucket(struct mos_bufmgr_gem *bufmgr_gem, int size)
98 }
99
100 static void
101-init_cache_buckets(struct mos_bufmgr_gem *bufmgr_gem, uint8_t alloc_mode)
102+init_cache_buckets(struct mos_bufmgr_gem *bufmgr_gem)
103+{
104+ unsigned long size, cache_max_size = 64 * 1024 * 1024;
105+
106+ /* OK, so power of two buckets was too wasteful of memory.
107+ * Give 3 other sizes between each power of two, to hopefully
108+ * cover things accurately enough. (The alternative is
109+ * probably to just go for exact matching of sizes, and assume
110+ * that for things like composited window resize the tiled
111+ * width/height alignment and rounding of sizes to pages will
112+ * get us useful cache hit rates anyway)
113+ */
114+ add_bucket(bufmgr_gem, 4096);
115+ add_bucket(bufmgr_gem, 4096 * 2);
116+ add_bucket(bufmgr_gem, 4096 * 3);
117+
118+ /* Initialize the linked lists for BO reuse cache. */
119+ for (size = 4 * 4096; size <= cache_max_size; size *= 2) {
120+ add_bucket(bufmgr_gem, size);
121+
122+ add_bucket(bufmgr_gem, size + size * 1 / 4);
123+ add_bucket(bufmgr_gem, size + size * 2 / 4);
124+ add_bucket(bufmgr_gem, size + size * 3 / 4);
125+ }
126+}
127+
128+static void
129+mos_gem_realloc_cache(struct mos_bufmgr *bufmgr, uint8_t alloc_mode)
130 {
131 unsigned long size, cache_max_size = 64 * 1024 * 1024, unit_size;
132+ struct mos_bufmgr_gem *bufmgr_gem = (struct mos_bufmgr_gem *)bufmgr;
133+
134+ // Clean up the pre-allocated cache before re-allocating according
135+ // to alloc_mode
136+ mos_bufmgr_cleanup_cache(bufmgr_gem);
137
138 /* OK, so power of two buckets was too wasteful of memory.
139 * Give 3 other sizes between each power of two, to hopefully
140@@ -5218,6 +5258,7 @@ mos_bufmgr_gem_init_i915(int fd, int batch_size)
141 bufmgr_gem->bufmgr.disable_object_capture = mos_gem_disable_object_capture;
142 bufmgr_gem->bufmgr.get_memory_info = mos_gem_get_memory_info;
143 bufmgr_gem->bufmgr.get_devid = mos_gem_get_devid;
144+ bufmgr_gem->bufmgr.realloc_cache = mos_gem_realloc_cache;
145 bufmgr_gem->bufmgr.set_context_param = mos_gem_set_context_param;
146 bufmgr_gem->bufmgr.set_context_param_parallel = mos_gem_set_context_param_parallel;
147 bufmgr_gem->bufmgr.set_context_param_load_balance = mos_gem_set_context_param_load_balance;
148@@ -5404,7 +5445,7 @@ mos_bufmgr_gem_init_i915(int fd, int batch_size)
149 bufmgr_gem->max_relocs = batch_size / sizeof(uint32_t) / 2 - 2;
150
151 DRMINITLISTHEAD(&bufmgr_gem->named);
152- init_cache_buckets(bufmgr_gem,alloc_mode);
153+ init_cache_buckets(bufmgr_gem);
154
155 DRMLISTADD(&bufmgr_gem->managers, &bufmgr_list);
156
157diff --git a/media_softlet/linux/common/os/i915/mos_bufmgr_api.c b/media_softlet/linux/common/os/i915/mos_bufmgr_api.c
158index abe8ef96a..d0e02c267 100644
159--- a/media_softlet/linux/common/os/i915/mos_bufmgr_api.c
160+++ b/media_softlet/linux/common/os/i915/mos_bufmgr_api.c
161@@ -1204,6 +1204,25 @@ mos_bufmgr_get_devid(struct mos_bufmgr *bufmgr)
162 }
163 }
164
165+void
166+mos_bufmgr_realloc_cache(struct mos_bufmgr *bufmgr, uint8_t alloc_mode)
167+{
168+ if(!bufmgr)
169+ {
170+ MOS_OS_CRITICALMESSAGE("Input null ptr\n");
171+ return;
172+ }
173+
174+ if (bufmgr->realloc_cache)
175+ {
176+ return bufmgr->realloc_cache(bufmgr, alloc_mode);
177+ }
178+ else
179+ {
180+ MOS_OS_CRITICALMESSAGE("Unsupported\n");
181+ }
182+}
183+
184 int
185 mos_query_engines_count(struct mos_bufmgr *bufmgr,
186 unsigned int *nengine)
187diff --git a/media_softlet/linux/common/os/i915_production/mos_bufmgr_priv.h b/media_softlet/linux/common/os/i915_production/mos_bufmgr_priv.h
188index c3b765a4c..1d7f7edb0 100644
189--- a/media_softlet/linux/common/os/i915_production/mos_bufmgr_priv.h
190+++ b/media_softlet/linux/common/os/i915_production/mos_bufmgr_priv.h
191@@ -358,6 +358,7 @@ struct mos_bufmgr {
192 void (*disable_object_capture)(struct mos_bufmgr *bufmgr) = nullptr;
193 int (*get_memory_info)(struct mos_bufmgr *bufmgr, char *info, uint32_t length) = nullptr;
194 int (*get_devid)(struct mos_bufmgr *bufmgr) = nullptr;
195+ void (*realloc_cache)(struct mos_bufmgr *bufmgr, uint8_t alloc_mode) = nullptr;
196 int (*query_engines_count)(struct mos_bufmgr *bufmgr,
197 unsigned int *nengine) = nullptr;
198
199diff --git a/media_softlet/linux/common/os/mos_context_specific_next.cpp b/media_softlet/linux/common/os/mos_context_specific_next.cpp
200index 543e262d1..87059f538 100644
201--- a/media_softlet/linux/common/os/mos_context_specific_next.cpp
202+++ b/media_softlet/linux/common/os/mos_context_specific_next.cpp
203@@ -90,25 +90,7 @@ MOS_STATUS OsContextSpecificNext::Init(DDI_DEVICE_CONTEXT ddiDriverContext)
204
205 userSettingPtr = MosInterface::MosGetUserSettingInstance(osDriverContext);
206
207- mode = BATCH_BUFFER_SIZE;
208- ReadUserSetting(
209- userSettingPtr,
210- value,
211- "INTEL MEDIA ALLOC MODE",
212- MediaUserSetting::Group::Device);
213-
214- if (value)
215- {
216- mode |= (value & 0x000000ff);
217- }
218- value = 0;
219- /* no need to set batch buffer size after switch to softpin
220- * keep it, just for test during relocation to softpin transition
221- * now , it could be a debug method , but is actually useless
222- * so it is safe to reuse the lowest 8bit to convey addtional information
223- * more suitable solution is deleting it , or add additional parameter*/
224-
225- m_bufmgr = mos_bufmgr_gem_init(m_fd, (int)mode, &m_deviceType);
226+ m_bufmgr = mos_bufmgr_gem_init(m_fd, BATCH_BUFFER_SIZE, &m_deviceType);
227 if (nullptr == m_bufmgr)
228 {
229 MOS_OS_ASSERTMESSAGE("Not able to allocate buffer manager, fd=0x%d", m_fd);
230@@ -151,6 +133,22 @@ MOS_STATUS OsContextSpecificNext::Init(DDI_DEVICE_CONTEXT ddiDriverContext)
231 return eStatus;
232 }
233
234+ if (m_platformInfo.eProductFamily == IGFX_METEORLAKE ||
235+ m_platformInfo.eProductFamily == IGFX_ARROWLAKE)
236+ {
237+ ReadUserSetting(
238+ userSettingPtr,
239+ value,
240+ "INTEL MEDIA ALLOC MODE",
241+ MediaUserSetting::Group::Device);
242+
243+ if (value)
244+ {
245+ mode = (value & 0x000000ff);
246+ }
247+ mos_bufmgr_realloc_cache(m_bufmgr, mode);
248+ }
249+
250 ReadUserSetting(
251 userSettingPtr,
252 value,
253--
2542.40.1
255
diff --git a/recipes-multimedia/libva/files/0009-Skip-cache-bucket-realloc-for-default-mode-0.patch b/recipes-multimedia/libva/files/0009-Skip-cache-bucket-realloc-for-default-mode-0.patch
new file mode 100644
index 00000000..8ee7ef14
--- /dev/null
+++ b/recipes-multimedia/libva/files/0009-Skip-cache-bucket-realloc-for-default-mode-0.patch
@@ -0,0 +1,33 @@
1From 18c32247cbc0e9fabff7a847add099496af9e53f Mon Sep 17 00:00:00 2001
2From: "Soon, Thean Siew" <thean.siew.soon@intel.com>
3Date: Mon, 8 Jan 2024 18:12:30 +0000
4Subject: [PATCH 09/12] Skip cache bucket realloc for default mode 0
5
6Upstream-Status: Submitted [https://github.com/intel/media-driver/pull/1754]
7
8Signed-off-by: Soon, Thean Siew <thean.siew.soon@intel.com>
9---
10 .../linux/common/os/mos_context_specific_next.cpp | 7 ++++++-
11 1 file changed, 6 insertions(+), 1 deletion(-)
12
13diff --git a/media_softlet/linux/common/os/mos_context_specific_next.cpp b/media_softlet/linux/common/os/mos_context_specific_next.cpp
14index 87059f538..9dbd5da79 100644
15--- a/media_softlet/linux/common/os/mos_context_specific_next.cpp
16+++ b/media_softlet/linux/common/os/mos_context_specific_next.cpp
17@@ -146,7 +146,12 @@ MOS_STATUS OsContextSpecificNext::Init(DDI_DEVICE_CONTEXT ddiDriverContext)
18 {
19 mode = (value & 0x000000ff);
20 }
21- mos_bufmgr_realloc_cache(m_bufmgr, mode);
22+
23+ // Realloc cache only if it's not mode 0
24+ if (mode)
25+ {
26+ mos_bufmgr_realloc_cache(m_bufmgr, mode);
27+ }
28 }
29
30 ReadUserSetting(
31--
322.40.1
33
diff --git a/recipes-multimedia/libva/files/0010-Fix-failed-4k-video-wall-test-case-and-color-corrupt.patch b/recipes-multimedia/libva/files/0010-Fix-failed-4k-video-wall-test-case-and-color-corrupt.patch
new file mode 100644
index 00000000..0100df77
--- /dev/null
+++ b/recipes-multimedia/libva/files/0010-Fix-failed-4k-video-wall-test-case-and-color-corrupt.patch
@@ -0,0 +1,195 @@
1From 7291ab5206c5e172c6c94dcfbe4f1bc258f3b7a5 Mon Sep 17 00:00:00 2001
2From: WenshengZhang <wensheng.zhang@intel.com>
3Date: Wed, 10 Jan 2024 14:08:37 +0800
4Subject: [PATCH 10/12] Fix failed 4k video wall test case and color corruption
5 of video composition
6
7Fix failed 4k video wall test case from 16CH video only show 1CH output and
8corruption observed on certain number of video composition when doing
9sample_multi_transcode.
10
11Upstream-Status: Backport [https://github.com/intel/media-driver/commit/38e14b1b97170b51586d00d1fa607e496b0c5825]
12Signed-off-by: Lim, Siew Hoon <siew.hoon.lim@intel.com>
13---
14 .../common/vp/kdll/hal_kerneldll_next.h | 1 +
15 .../vp/hal/packet/vp_render_fc_kernel.cpp | 7 ++
16 .../common/vp/kdll/hal_kerneldll_next.c | 70 +++++++++++--------
17 .../linux/common/vp/ddi/ddi_vp_functions.cpp | 20 ++----
18 4 files changed, 55 insertions(+), 43 deletions(-)
19
20diff --git a/media_common/agnostic/common/vp/kdll/hal_kerneldll_next.h b/media_common/agnostic/common/vp/kdll/hal_kerneldll_next.h
21index 6447999b7..8e2ab371e 100644
22--- a/media_common/agnostic/common/vp/kdll/hal_kerneldll_next.h
23+++ b/media_common/agnostic/common/vp/kdll/hal_kerneldll_next.h
24@@ -588,6 +588,7 @@ typedef struct tagKdll_FilterEntry
25 Kdll_Scalingratio ScalingRatio;
26 Kdll_RenderMethod RenderMethod;
27 Kdll_SetCSCCoeffMethod SetCSCCoeffMode;
28+ bool forceToTargetColorSpace;
29 } Kdll_FilterEntry, *PKdll_FilterEntry;
30
31 // Structure that defines a compositing filter
32diff --git a/media_softlet/agnostic/common/vp/hal/packet/vp_render_fc_kernel.cpp b/media_softlet/agnostic/common/vp/hal/packet/vp_render_fc_kernel.cpp
33index 8e982f67e..f8308fed1 100644
34--- a/media_softlet/agnostic/common/vp/hal/packet/vp_render_fc_kernel.cpp
35+++ b/media_softlet/agnostic/common/vp/hal/packet/vp_render_fc_kernel.cpp
36@@ -775,6 +775,13 @@ MOS_STATUS VpRenderFcKernel::BuildFilter(
37
38 for (i = 0; (i < (int)compParams->sourceCount) && (iMaxFilterSize > 0); i++)
39 {
40+ if (i > 0)
41+ {
42+ if (!RECT1_CONTAINS_RECT2(compParams->source[0].surf->rcDst, compParams->source[i].surf->rcDst))
43+ {
44+ pFilter->forceToTargetColorSpace = true;
45+ }
46+ }
47 src = &compParams->source[i];
48
49 //--------------------------------
50diff --git a/media_softlet/agnostic/common/vp/kdll/hal_kerneldll_next.c b/media_softlet/agnostic/common/vp/kdll/hal_kerneldll_next.c
51index d8f7d429a..151f3b039 100644
52--- a/media_softlet/agnostic/common/vp/kdll/hal_kerneldll_next.c
53+++ b/media_softlet/agnostic/common/vp/kdll/hal_kerneldll_next.c
54@@ -2378,6 +2378,7 @@ bool KernelDll_SetupCSC(
55 Kdll_CSC_Matrix curr_matrix;
56 Kdll_CSC_Matrix *matrix = pCSC->Matrix; // Color Space conversion matrix
57 uint8_t * matrixID = pCSC->MatrixID; // CSC coefficient allocation table
58+ bool forceToTargetColorSpace = false;
59
60 // Clear all CSC matrices
61 MOS_ZeroMemory(matrix, sizeof(pCSC->Matrix));
62@@ -2395,6 +2396,10 @@ bool KernelDll_SetupCSC(
63 //---------------------------------------------------------------//
64 for (i = iFilterSize, pFilter = pSearchState->Filter; i > 0; i--, pFilter++)
65 {
66+ if (pFilter->forceToTargetColorSpace)
67+ {
68+ forceToTargetColorSpace = true;
69+ }
70 // Disable Procamp for all layers except Main Video
71 // Disable Procamp if source is RGB
72 if (pFilter->layer != Layer_MainVideo ||
73@@ -2456,44 +2461,51 @@ bool KernelDll_SetupCSC(
74 //---------------------------------------------------------------//
75 if (sel_cspace == CSpace_Any)
76 {
77- int cs;
78- for (cs = (CSpace_Any + 1); cs < CSpace_Count; cs++)
79+ if (forceToTargetColorSpace)
80 {
81- // Skip color spaces not in use
82- cspace = (VPHAL_CSPACE)cs;
83- if (!cspace_in_use[cspace])
84- {
85- continue;
86- }
87-
88- // xvYCC and BT are treated as same for CSC considerations (BT.x to xvYCC.x matrix is I)
89- cspace = KernelDll_TranslateCspace(cspace);
90-
91- // Count # of CS conversions and matrices
92- csc_count = 0;
93- for (i = iFilterSize, pFilter = pSearchState->Filter; i > 0; i--, pFilter++)
94+ sel_cspace = out_cspace;
95+ }
96+ else
97+ {
98+ int cs;
99+ for (cs = (CSpace_Any + 1); cs < CSpace_Count; cs++)
100 {
101- // Ignore layers where the Color Space may be set in software (colorfill, palletized)
102- if (pFilter->cspace == CSpace_Any)
103+ // Skip color spaces not in use
104+ cspace = (VPHAL_CSPACE)cs;
105+ if (!cspace_in_use[cspace])
106 {
107 continue;
108 }
109
110- // Check if CSC/PA is required
111- if (KernelDll_TranslateCspace(pFilter->cspace) != cspace ||
112- pFilter->procamp != DL_PROCAMP_DISABLED)
113+ // xvYCC and BT are treated as same for CSC considerations (BT.x to xvYCC.x matrix is I)
114+ cspace = KernelDll_TranslateCspace(cspace);
115+
116+ // Count # of CS conversions and matrices
117+ csc_count = 0;
118+ for (i = iFilterSize, pFilter = pSearchState->Filter; i > 0; i--, pFilter++)
119 {
120- csc_count++;
121+ // Ignore layers where the Color Space may be set in software (colorfill, palletized)
122+ if (pFilter->cspace == CSpace_Any)
123+ {
124+ continue;
125+ }
126+
127+ // Check if CSC/PA is required
128+ if (KernelDll_TranslateCspace(pFilter->cspace) != cspace ||
129+ pFilter->procamp != DL_PROCAMP_DISABLED)
130+ {
131+ csc_count++;
132+ }
133 }
134- }
135
136- // Save best choice as requiring minimum number of CSC operations
137- if ((sel_csc_count < 0) || // Initial value
138- (csc_count < sel_csc_count) || // Minimum number of CSC operations
139- (csc_count == sel_csc_count && cs == main_cspace)) // Use main cspace as default if same CSC count
140- {
141- sel_cspace = cspace;
142- sel_csc_count = csc_count;
143+ // Save best choice as requiring minimum number of CSC operations
144+ if ((sel_csc_count < 0) || // Initial value
145+ (csc_count < sel_csc_count) || // Minimum number of CSC operations
146+ (csc_count == sel_csc_count && cs == main_cspace)) // Use main cspace as default if same CSC count
147+ {
148+ sel_cspace = cspace;
149+ sel_csc_count = csc_count;
150+ }
151 }
152 }
153 }
154diff --git a/media_softlet/linux/common/vp/ddi/ddi_vp_functions.cpp b/media_softlet/linux/common/vp/ddi/ddi_vp_functions.cpp
155index 40d0b3fad..e60a6c69c 100644
156--- a/media_softlet/linux/common/vp/ddi/ddi_vp_functions.cpp
157+++ b/media_softlet/linux/common/vp/ddi/ddi_vp_functions.cpp
158@@ -2115,9 +2115,8 @@ VAStatus DdiVpFunctions::SetBackgroundColorfill(
159 {
160 DDI_VP_FUNC_ENTER;
161 DDI_VP_CHK_NULL(vpHalRenderParams, "nullptr vpHalRenderParams.", VA_STATUS_ERROR_INVALID_PARAMETER);
162- DDI_VP_CHK_NULL(vpHalRenderParams->pTarget[0],"nullptr pTarget[0].", VA_STATUS_ERROR_INVALID_PARAMETER);
163
164- if ((outBackGroundcolor >> 24) != 0 || vpHalRenderParams->pTarget[0]->ColorSpace == CSpace_sRGB)
165+ if ((outBackGroundcolor >> 24) != 0)
166 {
167 if (vpHalRenderParams->pColorFillParams == nullptr)
168 {
169@@ -2126,18 +2125,11 @@ VAStatus DdiVpFunctions::SetBackgroundColorfill(
170
171 DDI_VP_CHK_NULL(vpHalRenderParams->pColorFillParams, "nullptr pColorFillParams.", VA_STATUS_ERROR_UNKNOWN);
172
173- if (vpHalRenderParams->pTarget[0]->ColorSpace == CSpace_sRGB && (outBackGroundcolor >> 24) == 0)
174- {
175- // set color space for sRGB output
176- vpHalRenderParams->pColorFillParams->CSpace = CSpace_sRGB;
177- }
178- else
179- {
180- // set background colorfill option
181- vpHalRenderParams->pColorFillParams->Color = outBackGroundcolor;
182- vpHalRenderParams->pColorFillParams->bYCbCr = false;
183- vpHalRenderParams->pColorFillParams->CSpace = CSpace_sRGB;
184- }
185+ // set background colorfill option
186+ vpHalRenderParams->pColorFillParams->Color = outBackGroundcolor;
187+ vpHalRenderParams->pColorFillParams->bYCbCr = false;
188+ vpHalRenderParams->pColorFillParams->CSpace = CSpace_sRGB;
189+
190 }
191 else
192 {
193--
1942.40.1
195
diff --git a/recipes-multimedia/libva/files/0011-Disable-422H-format-output.patch b/recipes-multimedia/libva/files/0011-Disable-422H-format-output.patch
new file mode 100644
index 00000000..2f4aec1e
--- /dev/null
+++ b/recipes-multimedia/libva/files/0011-Disable-422H-format-output.patch
@@ -0,0 +1,33 @@
1From f8b4d982232d4c1330e1e5f5dcd7cd8ca94decba Mon Sep 17 00:00:00 2001
2From: WenshengZhang <wensheng.zhang@intel.com>
3Date: Thu, 25 Jan 2024 16:35:10 +0800
4Subject: [PATCH 11/12] Disable 422H format output
5
6Disable 422H format output.
7
8Upstream-Status: Backport [https://github.com/intel/media-driver/commit/eab411768e61a46e096793291f5f992eecf76cd8]
9Signed-off-by: Lim, Siew Hoon <siew.hoon.lim@intel.com>
10---
11 .../agnostic/common/vp/hal/feature_manager/policy.cpp | 6 ++++++
12 1 file changed, 6 insertions(+)
13
14diff --git a/media_softlet/agnostic/common/vp/hal/feature_manager/policy.cpp b/media_softlet/agnostic/common/vp/hal/feature_manager/policy.cpp
15index 317cec25a..12f1124fa 100644
16--- a/media_softlet/agnostic/common/vp/hal/feature_manager/policy.cpp
17+++ b/media_softlet/agnostic/common/vp/hal/feature_manager/policy.cpp
18@@ -1140,6 +1140,12 @@ MOS_STATUS Policy::GetScalingExecutionCaps(SwFilter *feature, bool isHdrEnabled)
19 bool isAlphaSettingSupportedByVebox =
20 IsAlphaSettingSupportedByVebox(scalingParams->formatInput, scalingParams->formatOutput, scalingParams->pCompAlpha);
21
22+ if (scalingParams->formatOutput == Format_422H)
23+ {
24+ VP_PUBLIC_ASSERTMESSAGE("Scaling not support 422H format output.");
25+ return MOS_STATUS_UNIMPLEMENTED;
26+ }
27+
28 // Clean usedForNextPass flag.
29 if (scalingEngine->usedForNextPass)
30 {
31--
322.40.1
33
diff --git a/recipes-multimedia/libva/files/0012-Decode-Fix-AVC-decode-SFC-4K-hang-issue.patch b/recipes-multimedia/libva/files/0012-Decode-Fix-AVC-decode-SFC-4K-hang-issue.patch
new file mode 100644
index 00000000..1be9139d
--- /dev/null
+++ b/recipes-multimedia/libva/files/0012-Decode-Fix-AVC-decode-SFC-4K-hang-issue.patch
@@ -0,0 +1,32 @@
1From b93904533d3ee66c7919fa8e23d26b852a37a917 Mon Sep 17 00:00:00 2001
2From: Lim Siew Hoon <siew.hoon.lim@intel.com>
3Date: Tue, 30 Jan 2024 13:27:52 +0800
4Subject: [PATCH 12/12] [Decode] Fix AVC decode SFC 4K hang issue
5
6Updated VDSFC input width and height for AVC decode
7
8Upstream-Status: Submitted [https://github.com/intel-innersource/drivers.gpu.unified/pull/151401]
9
10Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
11---
12 .../hal/dec/avc/packet/decode_avc_downsampling_packet.cpp | 4 ++++
13 1 file changed, 4 insertions(+)
14
15diff --git a/media_softlet/agnostic/common/codec/hal/dec/avc/packet/decode_avc_downsampling_packet.cpp b/media_softlet/agnostic/common/codec/hal/dec/avc/packet/decode_avc_downsampling_packet.cpp
16index e75fd8137..9cc236bd7 100644
17--- a/media_softlet/agnostic/common/codec/hal/dec/avc/packet/decode_avc_downsampling_packet.cpp
18+++ b/media_softlet/agnostic/common/codec/hal/dec/avc/packet/decode_avc_downsampling_packet.cpp
19@@ -59,6 +59,10 @@ MOS_STATUS AvcDownSamplingPkt::InitSfcParams(VDBOX_SFC_PARAMS &sfcParams)
20
21 AvcBasicFeature *avcBasicFeature = dynamic_cast<AvcBasicFeature*>(m_basicFeature);
22 DECODE_CHK_NULL(avcBasicFeature);
23+
24+ sfcParams.input.width = avcBasicFeature->m_width;
25+ sfcParams.input.height = avcBasicFeature->m_height;
26+
27 CODEC_PICTURE curPic = avcBasicFeature->m_avcPicParams->CurrPic;
28
29 if (avcBasicFeature->m_avcPicParams->seq_fields.mb_adaptive_frame_field_flag == true)
30--
312.40.1
32
diff --git a/recipes-multimedia/libva/intel-media-driver_23.4.3.bb b/recipes-multimedia/libva/intel-media-driver_23.4.3.bb
new file mode 100644
index 00000000..6513d574
--- /dev/null
+++ b/recipes-multimedia/libva/intel-media-driver_23.4.3.bb
@@ -0,0 +1,61 @@
1SUMMARY = "VA driver for Intel Gen based graphics hardware"
2DESCRIPTION = "Intel Media Driver for VAAPI is a new VA-API (Video Acceleration API) \
3user mode driver supporting hardware accelerated decoding, encoding, \
4and video post processing for GEN based graphics hardware."
5
6HOMEPAGE = "https://github.com/intel/media-driver"
7BUGTRACKER = "https://github.com/intel/media-driver/issues"
8
9LICENSE = "MIT & BSD-3-Clause"
10LIC_FILES_CHKSUM = "file://LICENSE.md;md5=6aab5363823095ce682b155fef0231f0 \
11 file://media_driver/media_libvpx.LICENSE;md5=d5b04755015be901744a78cc30d390d4 \
12 "
13
14COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
15
16inherit features_check
17REQUIRED_DISTRO_FEATURES = "opengl"
18
19DEPENDS += "libva gmmlib"
20
21SRC_URI = "git://github.com/intel/media-driver.git;protocol=https;nobranch=1 \
22 file://0001-Disable-vp9-padding-on-mtl.patch \
23 file://0002-Force-ARGB-surface-to-tile4-for-ACM.patch \
24 file://0004-Add-device-ID-for-ARL.patch \
25 file://0005-Add-XR24-support-to-DMABuf.patch \
26 file://0006-add-INTEL-MEDIA-ALLOC-refineE-to-specify-the-memory-.patch \
27 file://0007-Skip-report-keys.patch \
28 file://0008-Limit-INTEL-MEDIA-ALLOC-MODE-to-MTL-and-ARL-only.patch \
29 file://0009-Skip-cache-bucket-realloc-for-default-mode-0.patch \
30 file://0010-Fix-failed-4k-video-wall-test-case-and-color-corrupt.patch \
31 file://0011-Disable-422H-format-output.patch \
32 file://0012-Decode-Fix-AVC-decode-SFC-4K-hang-issue.patch \
33 "
34
35SRCREV = "a9f272496fc0f3e823cc4a814666ea27b443d902"
36S = "${WORKDIR}/git"
37
38COMPATIBLE_HOST:x86-x32 = "null"
39
40UPSTREAM_CHECK_GITTAGREGEX = "^intel-media-(?P<pver>(?!600\..*)\d+(\.\d+)+)$"
41
42inherit cmake pkgconfig
43
44MEDIA_DRIVER_ARCH:x86 = "32"
45MEDIA_DRIVER_ARCH:x86-64 = "64"
46
47EXTRA_OECMAKE += " \
48 -DMEDIA_RUN_TEST_SUITE=OFF \
49 -DARCH=${MEDIA_DRIVER_ARCH} \
50 -DMEDIA_BUILD_FATAL_WARNINGS=OFF \
51 "
52
53CXXFLAGS:append:x86 = " -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
54
55do_configure:prepend:toolchain-clang() {
56 sed -i -e '/-fno-tree-pre/d' ${S}/media_driver/cmake/linux/media_compile_flags_linux.cmake
57}
58
59FILES:${PN} += " \
60 ${libdir}/dri/ \
61 "
diff --git a/recipes-multimedia/libva/intel-vaapi-driver_2.1.0.bb b/recipes-multimedia/libva/intel-vaapi-driver_2.4.1.bb
index d0fbf2da..5038d8d7 100644
--- a/recipes-multimedia/libva/intel-vaapi-driver_2.1.0.bb
+++ b/recipes-multimedia/libva/intel-vaapi-driver_2.4.1.bb
@@ -13,21 +13,22 @@ COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
13 13
14DEPENDS = "libva libdrm" 14DEPENDS = "libva libdrm"
15 15
16SRC_URI = "https://github.com/intel/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.bz2" 16SRC_URI = "https://github.com/intel/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.bz2 \
17SRC_URI[md5sum] = "ab4c33ab31183787dece9b99a86f7b8c" 17 "
18SRC_URI[sha256sum] = "ecfaf2ccc4b9af7340e002d2ef807d1e33051d4992f1983f5f4d60e516f86bdf" 18
19SRC_URI[sha256sum] = "0081fce08eb3a83f7d99c3b853c8fdfa0af437b8f5b0fb7c66faeb83bcbe0c19"
19 20
20UPSTREAM_CHECK_URI = "https://github.com/intel/intel-vaapi-driver/releases" 21UPSTREAM_CHECK_URI = "https://github.com/intel/intel-vaapi-driver/releases"
21 22
22inherit autotools pkgconfig distro_features_check 23inherit meson pkgconfig features_check
23 24
24REQUIRED_DISTRO_FEATURES = "opengl" 25REQUIRED_DISTRO_FEATURES = "opengl"
25 26
26PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "x11", "", d)} \ 27PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "x11", "", d)} \
27 ${@bb.utils.contains("DISTRO_FEATURES", "opengl wayland", "wayland", "", d)}" 28 ${@bb.utils.contains("DISTRO_FEATURES", "opengl wayland", "wayland", "", d)}"
28PACKAGECONFIG[x11] = "--enable-x11,--disable-x11" 29PACKAGECONFIG[x11] = "-Dwith_x11=yes, -Dwith_x11=no"
29PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland wayland-native virtual/egl" 30PACKAGECONFIG[wayland] = "-Dwith_wayland=yes, -Dwith_wayland=no, wayland wayland-native virtual/egl"
30 31
31FILES_${PN} += "${libdir}/dri/*.so" 32FILES:${PN} += "${libdir}/dri/*.so"
32FILES_${PN}-dev += "${libdir}/dri/*.la" 33FILES:${PN}-dev += "${libdir}/dri/*.la"
33FILES_${PN}-dbg += "${libdir}/dri/.debug" 34FILES:${PN}-dbg += "${libdir}/dri/.debug"
diff --git a/recipes-multimedia/libva/va-intel.bb b/recipes-multimedia/libva/va-intel.bb
deleted file mode 100644
index 33b81a30..00000000
--- a/recipes-multimedia/libva/va-intel.bb
+++ /dev/null
@@ -1,32 +0,0 @@
1DESCRIPTION = "Video Acceleration Add-ons for Intel BSPs"
2LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
4
5S = "${WORKDIR}"
6
7PR = "r1"
8
9def map_valibs(d):
10 # The intel implementation requires the intel-vaapi-driver package
11 if bb.utils.contains('MACHINE_FEATURES', 'va-impl-intel', "1", "0", d) == "1":
12 return "libva intel-vaapi-driver"
13 # All meta-intel video acceleration requires libva
14 return "libva"
15
16VA_IMPL = "${@map_valibs(d)}"
17
18PACKAGES = "\
19 va-intel \
20 "
21
22ALLOW_EMPTY_va-intel = "1"
23
24RDEPENDS_va-intel = " \
25 ${VA_IMPL} \
26 "
27
28COMPATIBLE_HOST = '(i.86|x86_64).*-linux*'
29
30inherit distro_features_check
31
32REQUIRED_DISTRO_FEATURES = "opengl"
diff --git a/recipes-multimedia/libyami/libyami-utils/0001-Fix-build-with-clang.patch b/recipes-multimedia/libyami/libyami-utils/0001-Fix-build-with-clang.patch
deleted file mode 100644
index a4a4029c..00000000
--- a/recipes-multimedia/libyami/libyami-utils/0001-Fix-build-with-clang.patch
+++ /dev/null
@@ -1,99 +0,0 @@
1From b7e66182788cd925570bb4c310e21fbcd3185040 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 12 Aug 2017 08:49:20 -0700
4Subject: [PATCH] Fix build with clang
5
6Fix errors e.g.
7error: comparison of constant -1 with expression of type 'char' is always true [-Werror,-Wtautological-constant-out-of-range-compare]error: comparison of constant -1 with expression of type 'char' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
8
9and
10
11psnr.cpp:225:17: error: bool literal returned from 'main' [-Werror,-Wmain]
12
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15Upstream-Status: Pending
16
17 tests/decodehelp.cpp | 2 +-
18 tests/encodehelp.h | 2 +-
19 tests/vpp.cpp | 2 +-
20 tests/yamitranscode.cpp | 2 +-
21 testscripts/psnr.cpp | 4 ++--
22 5 files changed, 6 insertions(+), 6 deletions(-)
23
24diff --git a/tests/decodehelp.cpp b/tests/decodehelp.cpp
25index a69eab6..2d96598 100644
26--- a/tests/decodehelp.cpp
27+++ b/tests/decodehelp.cpp
28@@ -70,7 +70,7 @@ bool processCmdLine(int argc, char** argv, DecodeParameter* parameters)
29 {"capi", no_argument, NULL, 0},
30 {NULL, no_argument, NULL, 0}};
31
32- char opt;
33+ int opt;
34 while ((opt = getopt_long_only(argc, argv, "h:m:n:i:f:o:w:?", long_opts,&option_index)) != -1){
35 switch (opt) {
36 case 'h':
37diff --git a/tests/encodehelp.h b/tests/encodehelp.h
38index 57ccd77..76df801 100644
39--- a/tests/encodehelp.h
40+++ b/tests/encodehelp.h
41@@ -107,7 +107,7 @@ static VideoRateControl string_to_rc_mode(char *str)
42
43 static bool process_cmdline(int argc, char *argv[])
44 {
45- char opt;
46+ int opt;
47 const struct option long_opts[] = {
48 { "help", no_argument, NULL, 'h' },
49 { "qp", required_argument, NULL, 0 },
50diff --git a/tests/vpp.cpp b/tests/vpp.cpp
51index 5a60c0a..52da43b 100644
52--- a/tests/vpp.cpp
53+++ b/tests/vpp.cpp
54@@ -151,7 +151,7 @@ public:
55 private:
56 bool processCmdLine(int argc, char* argv[])
57 {
58- char opt;
59+ int opt;
60 const struct option long_opts[] = {
61 { "help", no_argument, NULL, 'h' },
62 { "sharpening", required_argument, NULL, 's' },
63diff --git a/tests/yamitranscode.cpp b/tests/yamitranscode.cpp
64index 4cb72aa..2fc6725 100755
65--- a/tests/yamitranscode.cpp
66+++ b/tests/yamitranscode.cpp
67@@ -95,7 +95,7 @@ static VideoRateControl string_to_rc_mode(char *str)
68
69 static bool processCmdLine(int argc, char *argv[], TranscodeParams& para)
70 {
71- char opt;
72+ int opt;
73 const struct option long_opts[] = {
74 { "help", no_argument, NULL, 'h' },
75 { "qp", required_argument, NULL, 0 },
76diff --git a/testscripts/psnr.cpp b/testscripts/psnr.cpp
77index 5cc24c9..68bd668 100644
78--- a/testscripts/psnr.cpp
79+++ b/testscripts/psnr.cpp
80@@ -215,14 +215,14 @@ int main(int argc, char *argv[])
81 const char* psnrresult = "average_psnr.txt";
82 int width=0,height=0;
83 int standardpsnr = NORMAL_PSNR;
84- char opt;
85+ int opt;
86 while ((opt = getopt(argc, argv, "h:W:H:i:o:s:?")) != -1)
87 {
88 switch (opt) {
89 case 'h':
90 case '?':
91 print_help(argv[0]);
92- return false;
93+ return -1;
94 case 'i':
95 filename1 = optarg;
96 break;
97--
982.14.1
99
diff --git a/recipes-multimedia/libyami/libyami-utils_1.3.0.bb b/recipes-multimedia/libyami/libyami-utils_1.3.0.bb
deleted file mode 100644
index 00f14398..00000000
--- a/recipes-multimedia/libyami/libyami-utils_1.3.0.bb
+++ /dev/null
@@ -1,31 +0,0 @@
1SUMMARY = "Applications and Scripts for libyami."
2DESCRIPTION = "Applications and Scripts for libyami."
3
4HOMEPAGE = "https://github.com/intel/libyami-utils"
5BUGTRACKER = "https://github.com/intel/libyami-utils/issues/new"
6
7LICENSE = "Apache-2.0"
8LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
9
10SRC_URI = "git://github.com/intel/libyami-utils.git \
11 file://0001-Fix-build-with-clang.patch \
12 "
13SRCREV = "d9c62f6a0653aa2e59cd2af9a3c80d82122d2149"
14S = "${WORKDIR}/git"
15
16DEPENDS = "libva libyami"
17
18EXTRA_OECONF = "--enable-tests-gles --disable-md5"
19
20inherit autotools pkgconfig distro_features_check
21
22REQUIRED_DISTRO_FEATURES = "opengl"
23
24PACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
25
26# --enable-x11 needs libva-x11
27# gles-tests fail to build without x11: see https://github.com/intel/libyami-utils/issues/91
28PACKAGECONFIG[x11] = "--enable-x11 --enable-tests-gles,--disable-x11 --disable-tests-gles, virtual/libx11"
29
30UPSTREAM_CHECK_URI = "http://github.com/intel/libyami-utils/releases"
31UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)"
diff --git a/recipes-multimedia/libyami/libyami/0001-Makefile.am-point-to-build-dir-for-generated-headers.patch b/recipes-multimedia/libyami/libyami/0001-Makefile.am-point-to-build-dir-for-generated-headers.patch
deleted file mode 100644
index 673969cf..00000000
--- a/recipes-multimedia/libyami/libyami/0001-Makefile.am-point-to-build-dir-for-generated-headers.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1From 00fc21a41bf7e11d468227487c4e9de9e6d608e6 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Mon, 5 Feb 2018 11:16:18 +0800
4Subject: [PATCH] Makefile.am: point to build dir for generated headers
5
6Otherwise it will give out errors for missing YamiVersion.h.
7
8Upstream-Status: Submitted [https://github.com/intel/libyami/pull/827]
9
10Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
11---
12 common/Makefile.am | 1 +
13 1 file changed, 1 insertion(+)
14
15diff --git a/common/Makefile.am b/common/Makefile.am
16index 5ee61da..1a788e5 100644
17--- a/common/Makefile.am
18+++ b/common/Makefile.am
19@@ -40,6 +40,7 @@ extra_includes = \
20 libyami_common_cppflags = \
21 $(LIBVA_CFLAGS) \
22 -I$(top_srcdir)/interface \
23+ -I$(top_builddir)/interface \
24 $(extra_includes) \
25 $(NULL)
26
27--
282.7.4
29
diff --git a/recipes-multimedia/libyami/libyami/0001-bitWriter.cpp-Delete-unused-CACHEBYTES.patch b/recipes-multimedia/libyami/libyami/0001-bitWriter.cpp-Delete-unused-CACHEBYTES.patch
deleted file mode 100644
index a96c9b85..00000000
--- a/recipes-multimedia/libyami/libyami/0001-bitWriter.cpp-Delete-unused-CACHEBYTES.patch
+++ /dev/null
@@ -1,27 +0,0 @@
1From 294874b610a5b8af9b736b3afc938010af58785e Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 11 Aug 2017 17:15:45 -0700
4Subject: [PATCH 1/9] bitWriter.cpp: Delete unused CACHEBYTES
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8Upstream-Status: Pending
9
10 codecparsers/bitWriter.cpp | 1 -
11 1 file changed, 1 deletion(-)
12
13diff --git a/codecparsers/bitWriter.cpp b/codecparsers/bitWriter.cpp
14index 9bcb14d..08469bf 100644
15--- a/codecparsers/bitWriter.cpp
16+++ b/codecparsers/bitWriter.cpp
17@@ -24,7 +24,6 @@
18
19 namespace YamiParser {
20
21-const uint32_t CACHEBYTES = sizeof(unsigned long int);
22 const uint32_t CACHEBITS = sizeof(unsigned long int) * 8;
23
24 // clip to keep lowest n bits
25--
262.14.1
27
diff --git a/recipes-multimedia/libyami/libyami/0002-typecast-index-from-size_t-to-int.patch b/recipes-multimedia/libyami/libyami/0002-typecast-index-from-size_t-to-int.patch
deleted file mode 100644
index a216566c..00000000
--- a/recipes-multimedia/libyami/libyami/0002-typecast-index-from-size_t-to-int.patch
+++ /dev/null
@@ -1,42 +0,0 @@
1From 88fa048e22ad00b04054b8a64df53bd440e01537 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 11 Aug 2017 17:29:02 -0700
4Subject: [PATCH 2/9] typecast index from size_t to int
5
6size_t is not consistent across architectures e.g. on arm its unsigned int
7
8Fixes
9error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare]
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13Upstream-Status: Pending
14
15 codecparsers/jpegParser.cpp | 4 ++--
16 1 file changed, 2 insertions(+), 2 deletions(-)
17
18diff --git a/codecparsers/jpegParser.cpp b/codecparsers/jpegParser.cpp
19index 2217028..6da5c36 100644
20--- a/codecparsers/jpegParser.cpp
21+++ b/codecparsers/jpegParser.cpp
22@@ -639,7 +639,7 @@ bool Parser::parseDAC()
23
24 length -= 2;
25
26- if (index < 0 || index >= (2 * NUM_ARITH_TBLS)) {
27+ if ((int)index < 0 || index >= (2 * NUM_ARITH_TBLS)) {
28 ERROR("Invalid DAC Index");
29 return false;
30 }
31@@ -747,7 +747,7 @@ bool Parser::parseDHT()
32 huffTables = &m_dcHuffTables;
33 }
34
35- if (index < 0 || index >= NUM_HUFF_TBLS) {
36+ if ((int)index < 0 || index >= NUM_HUFF_TBLS) {
37 ERROR("Bad Huff Table Index");
38 return false;
39 }
40--
412.14.1
42
diff --git a/recipes-multimedia/libyami/libyami/0003-Add-Wno-invalid-offsetof-to-compiler-commandline.patch b/recipes-multimedia/libyami/libyami/0003-Add-Wno-invalid-offsetof-to-compiler-commandline.patch
deleted file mode 100644
index 17289602..00000000
--- a/recipes-multimedia/libyami/libyami/0003-Add-Wno-invalid-offsetof-to-compiler-commandline.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1From 533d63287e9dd8f269b137c18fbe6c19206c8668 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 11 Aug 2017 17:49:43 -0700
4Subject: [PATCH 3/9] Add -Wno-invalid-offsetof to compiler commandline
5
6clang++ is fussy about offsetof on non-POD types
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10Upstream-Status: Pending
11
12 codecparsers/Makefile.am | 1 +
13 1 file changed, 1 insertion(+)
14
15diff --git a/codecparsers/Makefile.am b/codecparsers/Makefile.am
16index 720bf81..d9226b3 100644
17--- a/codecparsers/Makefile.am
18+++ b/codecparsers/Makefile.am
19@@ -118,6 +118,7 @@ libyami_codecparser_cppflags = \
20 -Dvp8dx_start_decode=libyami_vp8dx_start_decode \
21 -Dvp8dx_bool_decoder_fill=libyami_vp8dx_bool_decoder_fill \
22 -I$(top_srcdir)/interface \
23+ -Wno-invalid-offsetof \
24 $(extra_includes) \
25 $(NULL)
26
27--
282.14.1
29
diff --git a/recipes-multimedia/libyami/libyami/0004-Typecast-POWER32SUB2-to-uint8_t.patch b/recipes-multimedia/libyami/libyami/0004-Typecast-POWER32SUB2-to-uint8_t.patch
deleted file mode 100644
index 27eca39b..00000000
--- a/recipes-multimedia/libyami/libyami/0004-Typecast-POWER32SUB2-to-uint8_t.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1From d9c831ee38da4551396fad5cd53c3dfc0e5e0cf8 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 11 Aug 2017 17:57:34 -0700
4Subject: [PATCH 4/9] Typecast POWER32SUB2 to uint8_t
5
6Fixes
7
8h265Parser.cpp:1064:5: error: comparison of constant 4294967294 with expression
9of type 'uint8_t' (aka 'unsigned char') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13Upstream-Status: Pending
14
15 codecparsers/h265Parser.cpp | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/codecparsers/h265Parser.cpp b/codecparsers/h265Parser.cpp
19index 0dea3a6..c6cded2 100644
20--- a/codecparsers/h265Parser.cpp
21+++ b/codecparsers/h265Parser.cpp
22@@ -125,7 +125,7 @@ namespace H265 {
23 \
24 CHECK_READ_UE(var->var##_max_num_reorder_pics[i], 0, var->var##_max_dec_pic_buffering_minus1[i]); \
25 \
26- CHECK_READ_UE(var->var##_max_latency_increase_plus1[i], 0, POWER32SUB2); \
27+ CHECK_READ_UE(var->var##_max_latency_increase_plus1[i], 0, (uint8_t)POWER32SUB2); \
28 } \
29 }
30
31--
322.14.1
33
diff --git a/recipes-multimedia/libyami/libyami/0005-move-c-definitions-out-of-extern-C-block.patch b/recipes-multimedia/libyami/libyami/0005-move-c-definitions-out-of-extern-C-block.patch
deleted file mode 100644
index e77e85f7..00000000
--- a/recipes-multimedia/libyami/libyami/0005-move-c-definitions-out-of-extern-C-block.patch
+++ /dev/null
@@ -1,130 +0,0 @@
1From 3748cf904089878971cfcf66abf14c4d74f8241a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 11 Aug 2017 18:03:07 -0700
4Subject: [PATCH 5/9] move c++ definitions out of extern "C" block
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8Upstream-Status: Pending
9
10 decoder/vaapidecoder_host.cpp | 2 +-
11 encoder/vaapiencoder_host.cpp | 3 ++-
12 interface/VideoDecoderHost.h | 8 ++++----
13 interface/VideoEncoderHost.h | 8 ++++----
14 interface/VideoPostProcessHost.h | 8 ++++----
15 vpp/vaapipostprocess_host.cpp | 3 +--
16 6 files changed, 16 insertions(+), 16 deletions(-)
17
18diff --git a/decoder/vaapidecoder_host.cpp b/decoder/vaapidecoder_host.cpp
19index bcc9165..d9129f3 100644
20--- a/decoder/vaapidecoder_host.cpp
21+++ b/decoder/vaapidecoder_host.cpp
22@@ -100,9 +100,9 @@ void releaseVideoDecoder(IVideoDecoder * p)
23 {
24 delete p;
25 }
26+} // extern "C"
27
28 std::vector<std::string> getVideoDecoderMimeTypes()
29 {
30 return VaapiDecoderFactory::keys();
31 }
32-} // extern "C"
33diff --git a/encoder/vaapiencoder_host.cpp b/encoder/vaapiencoder_host.cpp
34index 49e903a..3ee9354 100644
35--- a/encoder/vaapiencoder_host.cpp
36+++ b/encoder/vaapiencoder_host.cpp
37@@ -78,9 +78,10 @@ void releaseVideoEncoder(IVideoEncoder* p) {
38 delete p;
39 }
40
41+} // extern "C"
42+
43 std::vector<std::string> getVideoEncoderMimeTypes()
44 {
45 return VaapiEncoderFactory::keys();
46 }
47
48-} // extern "C"
49diff --git a/interface/VideoDecoderHost.h b/interface/VideoDecoderHost.h
50index 86210fe..fd2ba7b 100644
51--- a/interface/VideoDecoderHost.h
52+++ b/interface/VideoDecoderHost.h
53@@ -32,12 +32,12 @@ extern "C" { // for dlsym usage
54 YamiMediaCodec::IVideoDecoder *createVideoDecoder(const char *mimeType);
55 /// \brief destroy the decoder
56 void releaseVideoDecoder(YamiMediaCodec::IVideoDecoder * p);
57-/** \fn void getVideoDecoderMimeTypes()
58- * \brief return the MimeTypes enabled in the current build
59-*/
60-std::vector<std::string> getVideoDecoderMimeTypes();
61
62 typedef YamiMediaCodec::IVideoDecoder *(*YamiCreateVideoDecoderFuncPtr) (const char *mimeType);
63 typedef void (*YamiReleaseVideoDecoderFuncPtr)(YamiMediaCodec::IVideoDecoder * p);
64 }
65+// \fn void getVideoDecoderMimeTypes()
66+// \brief return the MimeTypes enabled in the current build
67+//
68+std::vector<std::string> getVideoDecoderMimeTypes();
69 #endif /* VIDEO_DECODER_HOST_H_ */
70diff --git a/interface/VideoEncoderHost.h b/interface/VideoEncoderHost.h
71index fb80335..5fb5ab3 100644
72--- a/interface/VideoEncoderHost.h
73+++ b/interface/VideoEncoderHost.h
74@@ -32,12 +32,12 @@ extern "C" { // for dlsym usage
75 YamiMediaCodec::IVideoEncoder *createVideoEncoder(const char *mimeType);
76 ///brief destroy encoder
77 void releaseVideoEncoder(YamiMediaCodec::IVideoEncoder * p);
78-/** \fn void getVideoEncoderMimeTypes()
79- * \brief return the MimeTypes enabled in the current build
80-*/
81-std::vector<std::string> getVideoEncoderMimeTypes();
82
83 typedef YamiMediaCodec::IVideoEncoder *(*YamiCreateVideoEncoderFuncPtr) (const char *mimeType);
84 typedef void (*YamiReleaseVideoEncoderFuncPtr)(YamiMediaCodec::IVideoEncoder * p);
85 }
86 #endif /* VIDEO_ENCODER_HOST_H_ */
87+// \fn void getVideoEncoderMimeTypes()
88+// \brief return the MimeTypes enabled in the current build
89+//
90+std::vector<std::string> getVideoEncoderMimeTypes();
91diff --git a/interface/VideoPostProcessHost.h b/interface/VideoPostProcessHost.h
92index de046cd..f1c5ce5 100644
93--- a/interface/VideoPostProcessHost.h
94+++ b/interface/VideoPostProcessHost.h
95@@ -34,12 +34,12 @@ YamiMediaCodec::IVideoPostProcess *createVideoPostProcess(const char *mimeType);
96 * \brief destroy encoder
97 */
98 void releaseVideoPostProcess(YamiMediaCodec::IVideoPostProcess * p);
99-/** \fn void getVideoPostProcessMimeTypes()
100- * \brief return the MimeTypes enabled in the current build
101-*/
102-std::vector<std::string> getVideoPostProcessMimeTypes();
103
104 typedef YamiMediaCodec::IVideoPostProcess *(*YamiCreateVideoPostProcessFuncPtr) (const char *mimeType);
105 typedef void (*YamiReleaseVideoPostProcessFuncPtr)(YamiMediaCodec::IVideoPostProcess * p);
106 }
107 #endif /* VIDEO_POST_PROCESS_HOST_H_ */
108+// \fn void getVideoPostProcessMimeTypes()
109+// \brief return the MimeTypes enabled in the current build
110+//
111+std::vector<std::string> getVideoPostProcessMimeTypes();
112diff --git a/vpp/vaapipostprocess_host.cpp b/vpp/vaapipostprocess_host.cpp
113index cd40dea..bc06b38 100644
114--- a/vpp/vaapipostprocess_host.cpp
115+++ b/vpp/vaapipostprocess_host.cpp
116@@ -75,10 +75,9 @@ void releaseVideoPostProcess(IVideoPostProcess * p)
117 {
118 delete p;
119 }
120+} // extern "C"
121
122 std::vector<std::string> getVideoPostProcessMimeTypes()
123 {
124 return VaapiPostProcessFactory::keys();
125 }
126-
127-} // extern "C"
128--
1292.14.1
130
diff --git a/recipes-multimedia/libyami/libyami/0006-Avoid-namespace-conflicts-by-adding-explicit-using-n.patch b/recipes-multimedia/libyami/libyami/0006-Avoid-namespace-conflicts-by-adding-explicit-using-n.patch
deleted file mode 100644
index c9c74520..00000000
--- a/recipes-multimedia/libyami/libyami/0006-Avoid-namespace-conflicts-by-adding-explicit-using-n.patch
+++ /dev/null
@@ -1,41 +0,0 @@
1From 27b61f5ab1b1643436f56517e4980734b4b9acca Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 11 Aug 2017 18:38:05 -0700
4Subject: [PATCH 6/9] Avoid namespace conflicts by adding explicit using
5 <namespace>
6
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8---
9Upstream-Status: Pending
10
11 decoder/vaapidecoder_h264.h | 1 +
12 decoder/vaapidecoder_h265.h | 1 +
13 2 files changed, 2 insertions(+)
14
15diff --git a/decoder/vaapidecoder_h264.h b/decoder/vaapidecoder_h264.h
16index 57e2c27..ea5c2f2 100644
17--- a/decoder/vaapidecoder_h264.h
18+++ b/decoder/vaapidecoder_h264.h
19@@ -30,6 +30,7 @@ namespace YamiMediaCodec {
20
21 class VaapiDecPictureH264;
22 class VaapiDecoderH264 : public VaapiDecoderBase {
23+using YamiMediaCodec::VaapiDecoderBase::createPicture;
24 public:
25 typedef SharedPtr<VaapiDecPictureH264> PicturePtr;
26 typedef std::vector<PicturePtr> RefSet;
27diff --git a/decoder/vaapidecoder_h265.h b/decoder/vaapidecoder_h265.h
28index f7e2303..159e25f 100644
29--- a/decoder/vaapidecoder_h265.h
30+++ b/decoder/vaapidecoder_h265.h
31@@ -38,6 +38,7 @@ namespace YamiMediaCodec {
32
33 class VaapiDecPictureH265;
34 class VaapiDecoderH265:public VaapiDecoderBase {
35+ using YamiMediaCodec::VaapiDecoderBase::createPicture;
36 typedef YamiParser::H265::SPS SPS;
37 typedef YamiParser::H265::SliceHeader SliceHeader;
38 typedef YamiParser::H265::NalUnit NalUnit;
39--
402.14.1
41
diff --git a/recipes-multimedia/libyami/libyami/0007-Delete-unused-variables.patch b/recipes-multimedia/libyami/libyami/0007-Delete-unused-variables.patch
deleted file mode 100644
index b80774c9..00000000
--- a/recipes-multimedia/libyami/libyami/0007-Delete-unused-variables.patch
+++ /dev/null
@@ -1,36 +0,0 @@
1From b982997c96e11b9c0b3cd58a31af2d0a219713a3 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 11 Aug 2017 18:39:58 -0700
4Subject: [PATCH 7/9] Delete unused variables
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8Upstream-Status: Pending
9
10 decoder/vaapidecoder_vp8.cpp | 8 ++++----
11 1 file changed, 4 insertions(+), 4 deletions(-)
12
13diff --git a/decoder/vaapidecoder_vp8.cpp b/decoder/vaapidecoder_vp8.cpp
14index 5fc89ec..ff5b896 100644
15--- a/decoder/vaapidecoder_vp8.cpp
16+++ b/decoder/vaapidecoder_vp8.cpp
17@@ -32,12 +32,12 @@ typedef VaapiDecoderVP8::PicturePtr PicturePtr;
18
19 // the following parameter apply to Intra-Predicted Macroblocks,
20 // $11.2 $11.4: key frame default probs
21-static const uint8_t keyFrameYModeProbs[4] = { 145, 156, 163, 128 };
22-static const uint8_t keyFrameUVModeProbs[3] = { 142, 114, 183 };
23+//static const uint8_t keyFrameYModeProbs[4] = { 145, 156, 163, 128 };
24+//static const uint8_t keyFrameUVModeProbs[3] = { 142, 114, 183 };
25
26 // $16.1: non-key frame default probs
27-static const uint8_t nonKeyFrameDefaultYModeProbs[4] = { 112, 86, 140, 37 };
28-static const uint8_t nonKeyFrameDefaultUVModeProbs[3] = { 162, 101, 204 };
29+//static const uint8_t nonKeyFrameDefaultYModeProbs[4] = { 112, 86, 140, 37 };
30+//static const uint8_t nonKeyFrameDefaultUVModeProbs[3] = { 162, 101, 204 };
31
32 static const uint32_t surfaceNumVP8 = 3;
33
34--
352.14.1
36
diff --git a/recipes-multimedia/libyami/libyami/0008-NalUnit-is-declared-in-different-namespace.patch b/recipes-multimedia/libyami/libyami/0008-NalUnit-is-declared-in-different-namespace.patch
deleted file mode 100644
index 18b98be8..00000000
--- a/recipes-multimedia/libyami/libyami/0008-NalUnit-is-declared-in-different-namespace.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1From c54130511c91e457f1c5bb47729f5e3a0fc0cb91 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 11 Aug 2017 18:42:28 -0700
4Subject: [PATCH 8/9] NalUnit is declared in different namespace
5
6Fixes
7vaapidecoder_h265.h:32:5: error: struct 'NalUnit' was previously declared as a class [-Werror,-Wmismatched-tags] struct NalUnit;
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11Upstream-Status: Pending
12
13 decoder/vaapidecoder_h265.h | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/decoder/vaapidecoder_h265.h b/decoder/vaapidecoder_h265.h
17index 159e25f..674638f 100644
18--- a/decoder/vaapidecoder_h265.h
19+++ b/decoder/vaapidecoder_h265.h
20@@ -29,7 +29,7 @@ namespace YamiParser {
21 namespace H265 {
22 struct SPS;
23 struct SliceHeader;
24- struct NalUnit;
25+ class NalUnit;
26 class Parser;
27 };
28 };
29--
302.14.1
31
diff --git a/recipes-multimedia/libyami/libyami/0009-Fix-clang-warnings.patch b/recipes-multimedia/libyami/libyami/0009-Fix-clang-warnings.patch
deleted file mode 100644
index 08ef455b..00000000
--- a/recipes-multimedia/libyami/libyami/0009-Fix-clang-warnings.patch
+++ /dev/null
@@ -1,37 +0,0 @@
1From a54dc7b6a777882f55a3f31bd97748a261db03d2 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 11 Aug 2017 18:53:06 -0700
4Subject: [PATCH 9/9] Fix clang warnings
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8Upstream-Status: Pending
9
10 encoder/vaapiencoder_h264.cpp | 4 ++--
11 1 file changed, 2 insertions(+), 2 deletions(-)
12
13diff --git a/encoder/vaapiencoder_h264.cpp b/encoder/vaapiencoder_h264.cpp
14index 98bc2ed..94015cb 100644
15--- a/encoder/vaapiencoder_h264.cpp
16+++ b/encoder/vaapiencoder_h264.cpp
17@@ -509,7 +509,7 @@ bit_writer_write_sps(BitWriter* bitwriter,
18 }
19 /* vcl_hrd_parameters_present_flag */
20 bitwriter->writeBits(0, 1);
21- if (nal_hrd_parameters_present_flag || 0/*vcl_hrd_parameters_present_flag*/) {
22+ if (nal_hrd_parameters_present_flag || !!(0)/*vcl_hrd_parameters_present_flag*/) {
23 /* low_delay_hrd_flag */
24 bitwriter->writeBits(0, 1);
25 }
26@@ -1889,7 +1889,7 @@ bool VaapiEncoderH264::addSliceHeaders (const PicturePtr& picture) const
27 sliceParam->num_macroblocks = curSliceMbs;
28 sliceParam->macroblock_info = VA_INVALID_ID;
29 sliceParam->slice_type = h264_get_slice_type (picture->m_type);
30- assert (sliceParam->slice_type != -1);
31+ assert ((int)sliceParam->slice_type != -1);
32 sliceParam->idr_pic_id = m_idrNum;
33 sliceParam->pic_order_cnt_lsb = picture->m_poc % m_maxPicOrderCnt;
34
35--
362.14.1
37
diff --git a/recipes-multimedia/libyami/libyami_1.3.0.bb b/recipes-multimedia/libyami/libyami_1.3.0.bb
deleted file mode 100644
index ce4f253a..00000000
--- a/recipes-multimedia/libyami/libyami_1.3.0.bb
+++ /dev/null
@@ -1,35 +0,0 @@
1SUMMARY = "Yami is media infrastructure base on libva"
2DESCRIPTION = "Yet Another Media Infrastructure \
3light weight hardware codec library base on VA-API "
4
5HOMEPAGE = "https://github.com/intel/libyami"
6BUGTRACKER = "https://github.com/intel/libyami/issues/new"
7
8LICENSE = "Apache-2.0"
9LIC_FILES_CHKSUM = "file://LICENSE.md;md5=3b83ef96387f14655fc854ddc3c6bd57"
10
11SRC_URI = "git://github.com/intel/libyami.git;branch=apache \
12 file://0001-bitWriter.cpp-Delete-unused-CACHEBYTES.patch \
13 file://0002-typecast-index-from-size_t-to-int.patch \
14 file://0003-Add-Wno-invalid-offsetof-to-compiler-commandline.patch \
15 file://0004-Typecast-POWER32SUB2-to-uint8_t.patch \
16 file://0005-move-c-definitions-out-of-extern-C-block.patch \
17 file://0006-Avoid-namespace-conflicts-by-adding-explicit-using-n.patch \
18 file://0007-Delete-unused-variables.patch \
19 file://0008-NalUnit-is-declared-in-different-namespace.patch \
20 file://0009-Fix-clang-warnings.patch \
21 file://0001-Makefile.am-point-to-build-dir-for-generated-headers.patch \
22"
23SRCREV = "0192c3c041e02e8eb753e9e3e02bfc7b55756ce2"
24S = "${WORKDIR}/git"
25
26PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "x11", "", d)}"
27PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11 libxrandr libxrender"
28
29DEPENDS = "libva"
30inherit autotools pkgconfig distro_features_check
31
32REQUIRED_DISTRO_FEATURES = "opengl"
33
34UPSTREAM_CHECK_URI = "https://github.com/intel/libyami/releases"
35UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)"
diff --git a/recipes-multimedia/mediasdk/files/0001-FindITT.cmake-fix-detection-of-header-library.patch b/recipes-multimedia/mediasdk/files/0001-FindITT.cmake-fix-detection-of-header-library.patch
new file mode 100644
index 00000000..87c4e82e
--- /dev/null
+++ b/recipes-multimedia/mediasdk/files/0001-FindITT.cmake-fix-detection-of-header-library.patch
@@ -0,0 +1,49 @@
1From be7cec47777bd35c44a59f2af73f12ce9c26d65c Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Wed, 7 Oct 2020 09:33:06 +0800
4Subject: [PATCH] FindITT.cmake: fix detection of header/library
5
6Use find_library to check for the library so distributions installing to
7standard locations can also work in addition to custom paths specified
8using CMAKE_ITT_HOME.
9
10Also add ittnotify to PATH_SUFFIXES for header for cases when
11ittnotify.h is installed in /usr/include/ittnotify for example.
12
13Upstream-Status: Submitted
14
15Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
16---
17 builder/FindITT.cmake | 6 +++---
18 1 file changed, 3 insertions(+), 3 deletions(-)
19
20diff --git a/builder/FindITT.cmake b/builder/FindITT.cmake
21index ba2542c5..d96acf2e 100644
22--- a/builder/FindITT.cmake
23+++ b/builder/FindITT.cmake
24@@ -35,19 +35,19 @@ if( ENABLE_ITT )
25
26 find_path( ITT_INCLUDE_DIRS ittnotify.h
27 PATHS ${CMAKE_ITT_HOME} ${CMAKE_VTUNE_HOME}
28- PATH_SUFFIXES include )
29+ PATH_SUFFIXES include ittnotify)
30
31 # Unfortunately SEAPI and VTune uses different names for itt library:
32 # * SEAPI uses libittnotify${arch}.a
33 # * VTune uses libittnotify.a
34 # We are trying to check both giving preference to SEAPI name.
35- find_path( ITT_LIBRARY_DIRS libittnotify${arch}.a
36+ find_library( ITT_LIBRARY_DIRS ittnotify${arch}
37 PATHS ${CMAKE_ITT_HOME} ${CMAKE_VTUNE_HOME}
38 PATH_SUFFIXES lib64 )
39 if( NOT ITT_LIBRARY_DIRS MATCHES NOTFOUND )
40 set( ITT_LIBRARIES "ittnotify${arch}" )
41 else()
42- find_path( ITT_LIBRARY_DIRS libittnotify.a
43+ find_library( ITT_LIBRARY_DIRS ittnotify
44 PATHS ${CMAKE_ITT_HOME} ${CMAKE_VTUNE_HOME}
45 PATH_SUFFIXES lib64 )
46 if( NOT ITT_LIBRARY_PATH MATCHES NOTFOUND )
47--
482.26.2
49
diff --git a/recipes-multimedia/mediasdk/files/fix-gcc13.patch b/recipes-multimedia/mediasdk/files/fix-gcc13.patch
new file mode 100644
index 00000000..fb973870
--- /dev/null
+++ b/recipes-multimedia/mediasdk/files/fix-gcc13.patch
@@ -0,0 +1,15 @@
1Upstream-Status: Inactive-Upstream
2Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
3
4diff --git a/api/mfx_dispatch/linux/mfxparser.cpp b/api/mfx_dispatch/linux/mfxparser.cpp
5index 9d3823ec3e..12e46d1881 100644
6--- a/api/mfx_dispatch/linux/mfxparser.cpp
7+++ b/api/mfx_dispatch/linux/mfxparser.cpp
8@@ -20,6 +20,7 @@
9
10 #include <ctype.h>
11 #include <stdio.h>
12+#include <stdint.h>
13 #include <stdlib.h>
14 #include <string.h>
15
diff --git a/recipes-multimedia/mediasdk/intel-mediasdk_23.2.2.bb b/recipes-multimedia/mediasdk/intel-mediasdk_23.2.2.bb
new file mode 100644
index 00000000..f00a4404
--- /dev/null
+++ b/recipes-multimedia/mediasdk/intel-mediasdk_23.2.2.bb
@@ -0,0 +1,63 @@
1SUMMARY = "Intel(R) Media SDK for hardware accelerated media processing"
2DESCRIPTION = "Intel(R) Media SDK provides an API to access hardware-accelerated \
3video decode, encode and filtering on Intel® platforms with integrated graphics."
4
5HOMEPAGE = "https://github.com/Intel-Media-SDK/MediaSDK"
6BUGTRACKER = "https://github.com/Intel-Media-SDK/MediaSDK/issues"
7
8LICENSE = "MIT"
9LIC_FILES_CHKSUM = "file://LICENSE;md5=3cb331af679cd8f968bf799a9c55b46e"
10
11CVE_DETAILS = "intel:media_sdk"
12
13# Only for 64 bit until media-driver issues aren't fixed
14COMPATIBLE_HOST = '(x86_64).*-linux'
15COMPATIBLE_HOST:x86-x32 = "null"
16
17inherit features_check
18REQUIRED_DISTRO_FEATURES = "opengl"
19
20DEPENDS += "libva"
21
22RDEPENDS:${PN} += "intel-media-driver"
23
24PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "dri3", "", d)} \
25 ${@bb.utils.contains("DISTRO_FEATURES", "wayland", "wayland", "", d)} \
26 samples \
27 itt \
28 "
29
30PACKAGECONFIG[dri3] = "-DENABLE_X11_DRI3=ON, -DENABLE_X11_DRI3=OFF"
31PACKAGECONFIG[itt] = "-DENABLE_ITT=ON, -DENABLE_ITT=OFF, itt"
32PACKAGECONFIG[opencl] = "-DENABLE_OPENCL=ON, -DENABLE_OPENCL=OFF, virtual/opencl-icd opencl-clhpp opencl-headers"
33PACKAGECONFIG[samples] = "-DBUILD_SAMPLES=ON, -DBUILD_SAMPLES=OFF"
34PACKAGECONFIG[wayland] = "-DENABLE_WAYLAND=ON, -DENABLE_WAYLAND=OFF, wayland wayland-native"
35
36SRC_URI = "git://github.com/Intel-Media-SDK/MediaSDK.git;protocol=https;nobranch=1;lfs=0 \
37 file://0001-FindITT.cmake-fix-detection-of-header-library.patch \
38 file://fix-gcc13.patch \
39 "
40
41SRCREV = "869b60a6c3d7b5e9f7c3b3b914986322dca4bbae"
42S = "${WORKDIR}/git"
43
44UPSTREAM_CHECK_GITTAGREGEX = "^intel-mediasdk-(?P<pver>(\d+(\.\d+)+))$"
45
46inherit cmake pkgconfig
47
48EXTRA_OECMAKE += "-DMFX_INCLUDE=${S}/api/include"
49
50do_install:append() {
51 mv ${D}${datadir}/mfx/samples ${D}${libdir}/mfx/samples
52}
53
54PACKAGE_BEFORE_PN = " ${PN}-samples"
55
56FILES:${PN} += " \
57 ${libdir}/mfx \
58 ${datadir}/mfx/plugins.cfg \
59 "
60
61FILES:${PN}-samples = "${libdir}/mfx/samples"
62
63INSANE_SKIP:${PN}-samples += "staticdev"
diff --git a/recipes-multimedia/onevpl/files/0001-ARLH-DID-open-source-6286.patch b/recipes-multimedia/onevpl/files/0001-ARLH-DID-open-source-6286.patch
new file mode 100644
index 00000000..8d1f3380
--- /dev/null
+++ b/recipes-multimedia/onevpl/files/0001-ARLH-DID-open-source-6286.patch
@@ -0,0 +1,39 @@
1From a425927469b36e7bc597bff4fdc24d42a1168d1a Mon Sep 17 00:00:00 2001
2From: gfxVPLsdm <gfxvplsdm@intel.com>
3Date: Mon, 18 Dec 2023 09:58:35 +0800
4Subject: [PATCH] ARLH DID open source (#6286)
5
6Co-authored-by: huangli <li.h.huang@intel.com>
7
8Upstream-Status: Backport [https://github.com/oneapi-src/oneVPL-intel-gpu/commit/66f1b4d60a367eb1b0774e0b4369f906e0e632ae]
9Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
10
11---
12 _studio/shared/include/mfxstructures-int.h | 7 ++++++-
13 1 file changed, 6 insertions(+), 1 deletion(-)
14
15diff --git a/_studio/shared/include/mfxstructures-int.h b/_studio/shared/include/mfxstructures-int.h
16index 363d9a63..8f16b0a8 100644
17--- a/_studio/shared/include/mfxstructures-int.h
18+++ b/_studio/shared/include/mfxstructures-int.h
19@@ -1,4 +1,4 @@
20-// Copyright (c) 2007-2021 Intel Corporation
21+// Copyright (c) 2007-2023 Intel Corporation
22 //
23 // Permission is hereby granted, free of charge, to any person obtaining a copy
24 // of this software and associated documentation files (the "Software"), to deal
25@@ -569,6 +569,11 @@ typedef struct {
26 /* ARL S */
27 { 0x7D67, MFX_HW_ARL, MFX_GT2 },
28
29+ /* ARL H*/
30+ { 0x7D51, MFX_HW_ARL, MFX_GT2 },
31+ { 0x7DD1, MFX_HW_ARL, MFX_GT2 },
32+ { 0x7D41, MFX_HW_ARL, MFX_GT2 },
33+
34 };
35
36 /*
37--
382.40.1
39
diff --git a/recipes-multimedia/onevpl/files/0001-Fix-SetBuffersYV12-V-U-plane-offsets-calculation-647.patch b/recipes-multimedia/onevpl/files/0001-Fix-SetBuffersYV12-V-U-plane-offsets-calculation-647.patch
new file mode 100644
index 00000000..8e014c97
--- /dev/null
+++ b/recipes-multimedia/onevpl/files/0001-Fix-SetBuffersYV12-V-U-plane-offsets-calculation-647.patch
@@ -0,0 +1,32 @@
1From e118062518c95d8fb0080cc8276b123a90bd0eb9 Mon Sep 17 00:00:00 2001
2From: gfxVPLsdm <gfxvplsdm@intel.com>
3Date: Wed, 21 Feb 2024 17:11:52 +0800
4Subject: [PATCH] Fix SetBuffersYV12() V & U plane offsets calculation (#6475)
5
6Signed-off-by: Hoe, Sheng Yang <sheng.yang.hoe@intel.com>
7Co-authored-by: Hoe, Sheng Yang <sheng.yang.hoe@intel.com>
8
9Upstream-Status: Backport [https://github.com/oneapi-src/oneVPL-intel-gpu/commit/ce704ddfe11724767ba86c9425a3917dc3100d4a]
10Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
11---
12 _studio/shared/src/libmfx_core_vaapi.cpp | 4 ++--
13 1 file changed, 2 insertions(+), 2 deletions(-)
14
15diff --git a/_studio/shared/src/libmfx_core_vaapi.cpp b/_studio/shared/src/libmfx_core_vaapi.cpp
16index 2cad86f8..fd5fc269 100644
17--- a/_studio/shared/src/libmfx_core_vaapi.cpp
18+++ b/_studio/shared/src/libmfx_core_vaapi.cpp
19@@ -462,8 +462,8 @@ public:
20 }
21 else
22 {
23- eb.offsets[1] = eb.offsets[0] + uint32_t(eb.height * eb.pitches[1] / 2);
24- eb.offsets[2] = eb.offsets[1] + uint32_t(eb.height * eb.pitches[2] / 2);
25+ eb.offsets[1] = eb.offsets[0] + uint32_t(eb.height * eb.pitches[0]);
26+ eb.offsets[2] = eb.offsets[1] + uint32_t(eb.height * eb.pitches[1] / 2);
27 }
28 eb.num_planes = 3;
29 eb.data_size = eb.offsets[2] + (eb.height * eb.pitches[2] / 2);
30--
312.40.1
32
diff --git a/recipes-multimedia/onevpl/files/0001-JPEGe-Enable-BGR4-JPEG-Enc-support-6470.patch b/recipes-multimedia/onevpl/files/0001-JPEGe-Enable-BGR4-JPEG-Enc-support-6470.patch
new file mode 100644
index 00000000..e3854407
--- /dev/null
+++ b/recipes-multimedia/onevpl/files/0001-JPEGe-Enable-BGR4-JPEG-Enc-support-6470.patch
@@ -0,0 +1,96 @@
1From 40c0bc6d3dfe172dd25908df2c16de29c34fa4d4 Mon Sep 17 00:00:00 2001
2From: gfxVPLsdm <gfxvplsdm@intel.com>
3Date: Mon, 5 Feb 2024 17:14:07 +0800
4Subject: [PATCH] [JPEGe] Enable BGR4 JPEG Enc support (#6470)
5
6Co-authored-by: vcheah <vincent.beng.keat.cheah@intel.com>
7
8Upstream-Status: Backport [https://github.com/oneapi-src/oneVPL-intel-gpu/commit/e73763d05f8fdc348c356b58dcb83075b5e868f8]
9Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
10---
11 .../mfx_lib/encode_hw/mjpeg/src/mfx_mjpeg_encode_hw.cpp | 6 ++++--
12 .../encode_hw/mjpeg/src/mfx_mjpeg_encode_hw_utils.cpp | 9 +++++----
13 2 files changed, 9 insertions(+), 6 deletions(-)
14
15diff --git a/_studio/mfx_lib/encode_hw/mjpeg/src/mfx_mjpeg_encode_hw.cpp b/_studio/mfx_lib/encode_hw/mjpeg/src/mfx_mjpeg_encode_hw.cpp
16index 141564b1..332f6372 100644
17--- a/_studio/mfx_lib/encode_hw/mjpeg/src/mfx_mjpeg_encode_hw.cpp
18+++ b/_studio/mfx_lib/encode_hw/mjpeg/src/mfx_mjpeg_encode_hw.cpp
19@@ -212,7 +212,8 @@ mfxStatus MFXVideoENCODEMJPEG_HW::QueryImplsDescription(
20 ah.PushBack(memCaps.ColorFormats) = MFX_FOURCC_YV12;
21 ah.PushBack(memCaps.ColorFormats) = MFX_FOURCC_YUY2;
22 ah.PushBack(memCaps.ColorFormats) = MFX_FOURCC_RGB4;
23- memCaps.NumColorFormats = 4;
24+ ah.PushBack(memCaps.ColorFormats) = MFX_FOURCC_BGR4;
25+ memCaps.NumColorFormats = 5;
26
27 ah.PushBack(profileCaps.MemDesc);
28 profileCaps.MemDesc[1] = profileCaps.MemDesc[0];
29@@ -392,7 +393,7 @@ mfxStatus MFXVideoENCODEMJPEG_HW::Query(VideoCORE * core, mfxVideoParam *in, mfx
30 if ((fourCC == 0 && chromaFormat == 0) ||
31 (fourCC == MFX_FOURCC_NV12 && (chromaFormat == MFX_CHROMAFORMAT_YUV420 || chromaFormat == MFX_CHROMAFORMAT_YUV400)) ||
32 (fourCC == MFX_FOURCC_YUY2 && chromaFormat == MFX_CHROMAFORMAT_YUV422H) ||
33- (fourCC == MFX_FOURCC_RGB4 && chromaFormat == MFX_CHROMAFORMAT_YUV444))
34+ ((fourCC == MFX_FOURCC_RGB4 || fourCC == MFX_FOURCC_BGR4) && chromaFormat == MFX_CHROMAFORMAT_YUV444))
35 {
36 out->mfx.FrameInfo.FourCC = in->mfx.FrameInfo.FourCC;
37 out->mfx.FrameInfo.ChromaFormat = in->mfx.FrameInfo.ChromaFormat;
38@@ -698,6 +699,7 @@ mfxStatus MFXVideoENCODEMJPEG_HW::Init(mfxVideoParam *par)
39 doubleBytesPerPx = 4;
40 break;
41 case MFX_FOURCC_RGB4:
42+ case MFX_FOURCC_BGR4:
43 default:
44 doubleBytesPerPx = 8;
45 break;
46diff --git a/_studio/mfx_lib/encode_hw/mjpeg/src/mfx_mjpeg_encode_hw_utils.cpp b/_studio/mfx_lib/encode_hw/mjpeg/src/mfx_mjpeg_encode_hw_utils.cpp
47index 3fc619d1..b1ab556e 100644
48--- a/_studio/mfx_lib/encode_hw/mjpeg/src/mfx_mjpeg_encode_hw_utils.cpp
49+++ b/_studio/mfx_lib/encode_hw/mjpeg/src/mfx_mjpeg_encode_hw_utils.cpp
50@@ -108,6 +108,7 @@ mfxStatus MfxHwMJpegEncode::CheckJpegParam(VideoCORE *core, mfxVideoParam & par,
51 BytesPerPx = 2;
52 break;
53 case MFX_FOURCC_RGB4:
54+ case MFX_FOURCC_BGR4:
55 default:
56 BytesPerPx = 4;
57 }
58@@ -157,7 +158,7 @@ mfxStatus ExecuteBuffers::Init(mfxVideoParam const *par, mfxEncodeCtrl const * c
59
60 m_payload_base.length = 0;
61 m_payload_list.clear();
62- if (fourCC == MFX_FOURCC_RGB4 && chromaFormat == MFX_CHROMAFORMAT_YUV444)
63+ if ((fourCC == MFX_FOURCC_RGB4 || fourCC == MFX_FOURCC_BGR4) && chromaFormat == MFX_CHROMAFORMAT_YUV444)
64 {
65 m_app14_data.header = 0xEEFF;//APP14
66 m_app14_data.lenH = 0;
67@@ -287,7 +288,7 @@ mfxStatus ExecuteBuffers::Init(mfxVideoParam const *par, mfxEncodeCtrl const * c
68 m_pps.num_components = 3;
69 else if (fourCC == MFX_FOURCC_NV12 && chromaFormat == MFX_CHROMAFORMAT_YUV400)
70 m_pps.num_components = 1;
71- else if (fourCC == MFX_FOURCC_RGB4 && chromaFormat == MFX_CHROMAFORMAT_YUV444)
72+ else if ((fourCC == MFX_FOURCC_RGB4 || fourCC == MFX_FOURCC_BGR4) && chromaFormat == MFX_CHROMAFORMAT_YUV444)
73 m_pps.num_components = 3;
74 else
75 MFX_RETURN(MFX_ERR_UNDEFINED_BEHAVIOR);
76@@ -341,7 +342,7 @@ mfxStatus ExecuteBuffers::Init(mfxVideoParam const *par, mfxEncodeCtrl const * c
77 {
78 // No external tables - use Quality parameter
79 m_dqt_list.resize(0);
80- if (fourCC == MFX_FOURCC_RGB4)
81+ if (fourCC == MFX_FOURCC_RGB4 || fourCC == MFX_FOURCC_BGR4)
82 {
83 m_pps.quantiser_table_selector[0] = 0;
84 m_pps.quantiser_table_selector[1] = 0;
85@@ -393,7 +394,7 @@ mfxStatus ExecuteBuffers::Init(mfxVideoParam const *par, mfxEncodeCtrl const * c
86 {
87 m_dht_list.resize(0);
88 }
89- else if (hwCaps->MaxNumHuffTable == 1 || fourCC == MFX_FOURCC_RGB4)
90+ else if (hwCaps->MaxNumHuffTable == 1 || (fourCC == MFX_FOURCC_RGB4 || fourCC == MFX_FOURCC_BGR4))
91 {
92 m_dht_list.resize(1);
93
94--
952.40.1
96
diff --git a/recipes-multimedia/onevpl/files/0001-vpl.pc.in-dont-pass-pcfiledir-to-cflags.patch b/recipes-multimedia/onevpl/files/0001-vpl.pc.in-dont-pass-pcfiledir-to-cflags.patch
new file mode 100644
index 00000000..762a4902
--- /dev/null
+++ b/recipes-multimedia/onevpl/files/0001-vpl.pc.in-dont-pass-pcfiledir-to-cflags.patch
@@ -0,0 +1,28 @@
1From 630c32194f53c70f4f654fb3d198790df253ba1f Mon Sep 17 00:00:00 2001
2From: Markus Volk <f_l_k@t-online.de>
3Date: Thu, 15 Jun 2023 13:43:32 +0200
4Subject: [PATCH] vpl.pc.in: dont pass pcfiledir to cflags
5
6Signed-off-by: Markus Volk <f_l_k@t-online.de>
7
8Upstream-Status: Inappropriate [oe specific]
9---
10 libvpl/pkgconfig/vpl.pc.in | 4 ++--
11 1 file changed, 2 insertions(+), 2 deletions(-)
12
13diff --git a/libvpl/pkgconfig/vpl.pc.in b/libvpl/pkgconfig/vpl.pc.in
14index ab468a9..05c020e 100644
15--- a/libvpl/pkgconfig/vpl.pc.in
16+++ b/libvpl/pkgconfig/vpl.pc.in
17@@ -8,6 +8,6 @@ Description: oneAPI Video Processing Library
18 Version: @API_VERSION_MAJOR@.@API_VERSION_MINOR@
19 URL: https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onevpl.html
20
21-Libs: -L${libdir} -l@OUTPUT_NAME@ @VPL_PKGCONFIG_DEPENDENT_LIBS@
22+Libs: -L@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ -l@OUTPUT_NAME@ @VPL_PKGCONFIG_DEPENDENT_LIBS@
23 Libs.private: @VPL_PKGCONFIG_PRIVATE_LIBS@
24-Cflags: -I${includedir} -I${includedir}/vpl
25+Cflags: -I@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@ -I@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@/vpl
26--
272.40.1
28
diff --git a/recipes-multimedia/onevpl/onevpl-intel-gpu_23.4.3.bb b/recipes-multimedia/onevpl/onevpl-intel-gpu_23.4.3.bb
new file mode 100644
index 00000000..0b849bf1
--- /dev/null
+++ b/recipes-multimedia/onevpl/onevpl-intel-gpu_23.4.3.bb
@@ -0,0 +1,33 @@
1SUMMARY = "Intel(R) oneVPL runtime for Intel GPU accelerated media processing"
2DESCRIPTION = "Intel(R) oneVPL runtime provides an runtime to access hardware-accelerated \
3video decode, encode and filtering on Intel® graphics."
4
5HOMEPAGE = "https://github.com/oneapi-src/oneVPL-intel-gpu"
6BUGTRACKER = "https://github.com/oneapi-src/oneVPL-intel-gpu/issues"
7
8LICENSE = "MIT"
9LIC_FILES_CHKSUM = "file://LICENSE;md5=eb8cb45b9b57dbaa9fcc9adc4230202b"
10
11PE = "1"
12
13# Only for 64 bit
14COMPATIBLE_HOST = '(x86_64).*-linux'
15COMPATIBLE_HOST:x86-x32 = "null"
16
17DEPENDS += "libdrm libva intel-media-driver onevpl pkgconfig-native"
18RDEPENDS:${PN} += "intel-media-driver"
19
20SRC_URI = "git://github.com/oneapi-src/oneVPL-intel-gpu.git;protocol=https;nobranch=1;lfs=0 \
21 file://0001-ARLH-DID-open-source-6286.patch \
22 file://0001-JPEGe-Enable-BGR4-JPEG-Enc-support-6470.patch \
23 file://0001-Fix-SetBuffersYV12-V-U-plane-offsets-calculation-647.patch \
24 "
25
26SRCREV = "852fa9f705ef44c004d014548601f3804a6de705"
27S = "${WORKDIR}/git"
28
29FILES:${PN} += " \
30 ${libdir}/libmfx-gen/enctools.so \
31 "
32
33inherit cmake
diff --git a/recipes-multimedia/onevpl/onevpl_2023.4.0.bb b/recipes-multimedia/onevpl/onevpl_2023.4.0.bb
new file mode 100644
index 00000000..513c7f2c
--- /dev/null
+++ b/recipes-multimedia/onevpl/onevpl_2023.4.0.bb
@@ -0,0 +1,40 @@
1SUMMARY = "oneAPI Video Processing Library"
2DESCRIPTION = "The oneAPI Video Processing Library (oneVPL) provides \
3a single video processing API for encode, decode, and video processing \
4that works across a wide range of accelerators."
5
6HOMEPAGE = "https://github.com/oneapi-src/oneVPL"
7LICENSE = "MIT"
8LIC_FILES_CHKSUM = "file://LICENSE;md5=c18ea6bb4786a26bf4eee88a7424a408 \
9 file://third-party-programs.txt;md5=0e35a23482445dd089b4eabe19103a06"
10
11SRC_URI = "git://github.com/oneapi-src/oneVPL.git;protocol=https;branch=master \
12 file://0001-vpl.pc.in-dont-pass-pcfiledir-to-cflags.patch \
13 "
14SRCREV = "2274efcd3672b43297ef774f332e1fed6781381c"
15S = "${WORKDIR}/git"
16
17inherit cmake
18DEPENDS += "libva pkgconfig-native"
19
20PACKAGECONFIG ??= "tools"
21PACKAGECONFIG[tools] = "-DBUILD_TOOLS=ON, -DBUILD_TOOLS=OFF, wayland wayland-native wayland-protocols"
22
23do_install:append() {
24 mkdir -p ${D}${datadir}/oneVPL/samples
25 mv ${D}${bindir}/sample_* ${D}${datadir}/oneVPL/samples
26}
27
28COMPATIBLE_HOST = '(x86_64).*-linux'
29
30PACKAGES =+ "${PN}-examples"
31
32FILES:${PN}-examples = "${datadir}/vpl \
33 "
34
35FILES_SOLIBSDEV = ""
36FILES:${PN}-dev += "${libdir}/libvpl.so"
37
38FILES:${PN} += " ${datadir}/oneVPL/samples \
39 ${libdir}/vpl/libvpl_wayland.so \
40 "
diff --git a/recipes-oneapi/crypto/intel-crypto-mb/0001-CMakeLists.txt-exclude-host-system-headers.patch b/recipes-oneapi/crypto/intel-crypto-mb/0001-CMakeLists.txt-exclude-host-system-headers.patch
new file mode 100644
index 00000000..58ed1c9a
--- /dev/null
+++ b/recipes-oneapi/crypto/intel-crypto-mb/0001-CMakeLists.txt-exclude-host-system-headers.patch
@@ -0,0 +1,27 @@
1From efedbf9080c19241c2aa9ee7ba901245d38c8fa2 Mon Sep 17 00:00:00 2001
2From: Naveen Saini <naveen.kumar.saini@intel.com>
3Date: Mon, 7 Mar 2022 16:44:24 +0800
4Subject: [PATCH 1/2] CMakeLists.txt: exclude host system headers
5
6Upstream-Status: Inappropriate
7
8Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
9---
10 sources/ippcp/crypto_mb/CMakeLists.txt | 1 -
11 1 file changed, 1 deletion(-)
12
13diff --git a/sources/ippcp/crypto_mb/CMakeLists.txt b/sources/ippcp/crypto_mb/CMakeLists.txt
14index c4cc82a..4094f34 100644
15--- a/sources/ippcp/crypto_mb/CMakeLists.txt
16+++ b/sources/ippcp/crypto_mb/CMakeLists.txt
17@@ -82,7 +82,6 @@ include_directories(
18 ${CRYPTO_MB_INCLUDE_DIR}
19 ${OPENSSL_INCLUDE_DIR}
20 $<$<C_COMPILER_ID:Intel>:$ENV{ROOT}/compiler/include $ENV{ROOT}/compiler/include/icc>
21- $<$<NOT:$<C_COMPILER_ID:Intel>>:${CMAKE_SYSTEM_INCLUDE_PATH}>
22 $<$<OR:$<C_COMPILER_ID:Intel>,$<BOOL:${MSVC_IDE}>>:$ENV{INCLUDE}>
23 )
24
25--
262.17.1
27
diff --git a/recipes-oneapi/crypto/intel-crypto-mb/0001-crypto-mb-Make-sure-libs-are-installed-correctly.patch b/recipes-oneapi/crypto/intel-crypto-mb/0001-crypto-mb-Make-sure-libs-are-installed-correctly.patch
new file mode 100644
index 00000000..c47c8de5
--- /dev/null
+++ b/recipes-oneapi/crypto/intel-crypto-mb/0001-crypto-mb-Make-sure-libs-are-installed-correctly.patch
@@ -0,0 +1,42 @@
1From 3b7b4eca54aa8d851e37f60c74e4a027fa7b21f2 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Wed, 14 Jun 2023 13:18:45 +0800
4Subject: [PATCH] crypto-mb: Make sure libs are installed correctly
5
6Dont assume that "lib" is always the correct destination. This fixes
7multilib builds when libdir != /usr/lib.
8
9Upstream-Status: Pending
10
11Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
12---
13 sources/ippcp/crypto_mb/src/CMakeLists.txt | 6 +++---
14 1 file changed, 3 insertions(+), 3 deletions(-)
15
16diff --git a/sources/ippcp/crypto_mb/src/CMakeLists.txt b/sources/ippcp/crypto_mb/src/CMakeLists.txt
17index c9cad06..31f52bd 100644
18--- a/sources/ippcp/crypto_mb/src/CMakeLists.txt
19+++ b/sources/ippcp/crypto_mb/src/CMakeLists.txt
20@@ -123,8 +123,8 @@ endif(DYNAMIC_LIB OR MB_STANDALONE)
21 # Installation of the shared library
22 if (MB_STANDALONE) # standalone crypto_mb's cmake run
23 install(TARGETS ${MB_DYN_LIB_TARGET}
24- LIBRARY DESTINATION "lib"
25- RUNTIME DESTINATION "lib"
26+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
27+ RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}
28 PUBLIC_HEADER DESTINATION "include/crypto_mb")
29 elseif (DYNAMIC_LIB) # build from ippcp's cmake
30 install(TARGETS ${MB_DYN_LIB_TARGET}
31@@ -154,7 +154,7 @@ endif()
32 # Static lib installation
33 if(MB_STANDALONE)
34 install(TARGETS ${MB_STATIC_LIB_TARGET}
35- ARCHIVE DESTINATION "lib"
36+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
37 PUBLIC_HEADER DESTINATION "include/crypto_mb")
38 else()
39 install(TARGETS ${MB_STATIC_LIB_TARGET}
40--
412.37.3
42
diff --git a/recipes-oneapi/crypto/intel-crypto-mb/0002-cmake-exclude-Yocto-build-flags.patch b/recipes-oneapi/crypto/intel-crypto-mb/0002-cmake-exclude-Yocto-build-flags.patch
new file mode 100644
index 00000000..62b56ea2
--- /dev/null
+++ b/recipes-oneapi/crypto/intel-crypto-mb/0002-cmake-exclude-Yocto-build-flags.patch
@@ -0,0 +1,45 @@
1From b4549bb765d279b5ba042c6340e1dd69d0890b64 Mon Sep 17 00:00:00 2001
2From: Naveen Saini <naveen.kumar.saini@intel.com>
3Date: Thu, 10 Mar 2022 14:30:01 +0800
4Subject: [PATCH 2/2] cmake: exclude Yocto build flags
5
6Ipp-crypto has its own set of flags and -march values,
7which causes conflict with default -march=nehalem in gcc
8
9Upstream-Status: Inappropriate
10
11Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
12---
13 sources/ippcp/crypto_mb/src/CMakeLists.txt | 2 +-
14 sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake | 2 +-
15 2 files changed, 2 insertions(+), 2 deletions(-)
16
17diff --git a/sources/ippcp/crypto_mb/src/CMakeLists.txt b/sources/ippcp/crypto_mb/src/CMakeLists.txt
18index 1ca1a8c..5284d62 100644
19--- a/sources/ippcp/crypto_mb/src/CMakeLists.txt
20+++ b/sources/ippcp/crypto_mb/src/CMakeLists.txt
21@@ -81,7 +81,7 @@ endif()
22 set(MB_LIB_TARGET ${MB_DYN_LIB_TARGET})
23
24 set_source_files_properties(${CRYPTO_MB_SOURCES} PROPERTIES COMPILE_DEFINITIONS "${AVX512_LIBRARY_DEFINES}"
25- COMPILE_FLAGS "${AVX512_CFLAGS} ${CMAKE_ASM_FLAGS} ${CMAKE_C_FLAGS_SECURITY}")
26+ COMPILE_FLAGS "${AVX512_CFLAGS} ${CMAKE_C_FLAGS_SECURITY}")
27
28 # Don't specify architectural flags for the assembler for this sources, because of the bug in Intel® C Compiler under MacOS: error: invalid instruction mnemonic 'vkmovb'
29 # The bug has been fixed since version 2021.3. This is a workaround to support older versions of Intel® C Compiler.
30diff --git a/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake b/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake
31index a2abeeb..aadd6e2 100644
32--- a/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake
33+++ b/sources/ippcp/crypto_mb/src/cmake/linux/GNU.cmake
34@@ -58,7 +58,7 @@ set(LINK_FLAGS_DYNAMIC "${LINK_FLAGS_DYNAMIC} ${CRYPTO_MB_SOURCES_DIR}/cmake/dll
35 # Compiler flags
36
37 # Tells the compiler to align functions and loops
38-set(CMAKE_C_FLAGS " -falign-functions=32 -falign-loops=32")
39+set(CMAKE_C_FLAGS " -falign-functions=32 -falign-loops=32 ${TOOLCHAIN_OPTIONS}")
40 # Ensures that compilation takes place in a freestanding environment
41 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffreestanding")
42
43--
442.17.1
45
diff --git a/recipes-oneapi/crypto/intel-crypto-mb_2021.11.1.bb b/recipes-oneapi/crypto/intel-crypto-mb_2021.11.1.bb
new file mode 100644
index 00000000..be72fd85
--- /dev/null
+++ b/recipes-oneapi/crypto/intel-crypto-mb_2021.11.1.bb
@@ -0,0 +1,28 @@
1SUMMARY = "Crypto Multi-buffer Library"
2DESCRIPTION = "Intel® Integrated Performance Primitives (Intel® IPP) Cryptography \
3is a secure, fast and lightweight library of building blocks for cryptography, \
4highly-optimized for various Intel® CPUs."
5HOMEPAGE = "https://github.com/intel/ipp-crypto"
6
7LICENSE = "Apache-2.0"
8
9LIC_FILES_CHKSUM = "file://../../../LICENSE;md5=e787af283468feca985d6b865d27d95b"
10
11IPP_BRANCH = "ipp-crypto_${@'_'.join(d.getVar('PV').rsplit('.')[-3:])}"
12
13SRC_URI = "git://github.com/intel/ipp-crypto;protocol=https;branch=${IPP_BRANCH} \
14 file://0001-CMakeLists.txt-exclude-host-system-headers.patch;striplevel=4 \
15 file://0002-cmake-exclude-Yocto-build-flags.patch;striplevel=4 \
16 file://0001-crypto-mb-Make-sure-libs-are-installed-correctly.patch;striplevel=4 \
17 "
18SRCREV = "d02611e34328898d16025467d3deeb7d62b6076b"
19
20S = "${WORKDIR}/git/sources/ippcp/crypto_mb"
21
22DEPENDS = "openssl"
23
24inherit cmake pkgconfig
25COMPATIBLE_HOST = '(x86_64).*-linux'
26
27EXTRA_OECMAKE += " -DARCH=intel64"
28EXTRA_OECMAKE += " -DTOOLCHAIN_OPTIONS='${TOOLCHAIN_OPTIONS}'"
diff --git a/recipes-oneapi/onedpl/onedpl_2022.3.0.bb b/recipes-oneapi/onedpl/onedpl_2022.3.0.bb
new file mode 100644
index 00000000..d80b64c9
--- /dev/null
+++ b/recipes-oneapi/onedpl/onedpl_2022.3.0.bb
@@ -0,0 +1,26 @@
1SUMMARY = "oneAPI DPC++ Library (oneDPL)"
2DESCRIPTION = "The oneAPI DPC++ Library (oneDPL) aims to work with the \
3oneAPI DPC++ Compiler to provide high-productivity APIs to developers, \
4which can minimize DPC++ programming efforts across devices for high \
5performance parallel applications."
6HOMEPAGE = "https://github.com/oneapi-src/oneDPL"
7
8LICENSE = "Apache-2.0-with-LLVM-exception"
9LIC_FILES_CHKSUM = "file://licensing/LICENSE.txt;md5=2e982d844baa4df1c80de75470e0c5cb \
10 file://licensing/third-party-programs.txt;md5=cfb8d6b1f04a8fcc7d0dddd817619634"
11
12S = "${WORKDIR}/git"
13
14SRC_URI = "git://github.com/oneapi-src/oneDPL.git;protocol=https;branch=release/2022.3 \
15 "
16SRCREV = "180f18ad25fbc39fa13bad43f1df7d54ee8f5609"
17
18do_compile[noexec] = "1"
19do_configure[noexec] = "1"
20
21do_install() {
22 install -d -m 755 ${D}${includedir}/onedpl
23 cp -r ${S}/include/* ${D}${includedir}/onedpl
24}
25
26UPSTREAM_CHECK_GITTAGREGEX = "^oneDPL-(?P<pver>(\d+(\.\d+)+))-release$"
diff --git a/recipes-oneapi/setup-oneapi-env/files/intel-oneapi-runtime.conf b/recipes-oneapi/setup-oneapi-env/files/intel-oneapi-runtime.conf
new file mode 100644
index 00000000..5faf9854
--- /dev/null
+++ b/recipes-oneapi/setup-oneapi-env/files/intel-oneapi-runtime.conf
@@ -0,0 +1,4 @@
1/opt/intel/oneapi/lib
2/opt/intel/oneapi/lib/intel64
3/opt/intel/oneapi/lib/ia32
4/opt/intel/oneapi/lib/emu
diff --git a/recipes-oneapi/setup-oneapi-env/setup-intel-oneapi-env_2023.0.0-25370.bb b/recipes-oneapi/setup-oneapi-env/setup-intel-oneapi-env_2023.0.0-25370.bb
new file mode 100644
index 00000000..702f794e
--- /dev/null
+++ b/recipes-oneapi/setup-oneapi-env/setup-intel-oneapi-env_2023.0.0-25370.bb
@@ -0,0 +1,20 @@
1SUMMARY = "Intel® oneAPI runtime libraries environment set up"
2DESCRIPTION = "Recipe to set up the environment for Intel® oneAPI runtime libraries \
3via configuration file in ld.so.conf.d directory."
4
5LICENSE = "EULA"
6LIC_FILES_CHKSUM = "file://${CUSTOM_LICENSES_PATH}/EULA;md5=7bfc91523de2e84e7131d0eacf2827d4"
7
8SRC_URI = "file://intel-oneapi-runtime.conf"
9
10do_install() {
11 mkdir -p ${D}${sysconfdir}/ld.so.conf.d/
12 install -m 644 ${WORKDIR}/intel-oneapi-runtime.conf ${D}${sysconfdir}/ld.so.conf.d/
13}
14
15pkg_postinst_ontarget:${PN}() {
16if [ x"$D" = "x" ]; then
17 if [ -x /sbin/ldconfig ]; then /sbin/ldconfig ; fi
18fi
19}
20BBCLASSEXTEND = "native nativesdk"
diff --git a/recipes-rt/images/core-image-rt-sdk.bb b/recipes-rt/images/core-image-rt-sdk.bb
index 6b43a872..920c4cee 100644
--- a/recipes-rt/images/core-image-rt-sdk.bb
+++ b/recipes-rt/images/core-image-rt-sdk.bb
@@ -11,7 +11,7 @@ python () {
11DESCRIPTION = "Small image capable of booting a device with a test suite and \ 11DESCRIPTION = "Small image capable of booting a device with a test suite and \
12tools for real-time use. It includes the full meta-toolchain, development \ 12tools for real-time use. It includes the full meta-toolchain, development \
13headers and libraries to form a standalone SDK." 13headers and libraries to form a standalone SDK."
14DEPENDS = "linux-intel-rt" 14DEPENDS += "linux-intel-rt"
15 15
16IMAGE_FEATURES += "dev-pkgs tools-sdk tools-debug eclipse-debug tools-profile tools-testapps debug-tweaks" 16IMAGE_FEATURES += "dev-pkgs tools-sdk tools-debug eclipse-debug tools-profile tools-testapps debug-tweaks"
17 17
diff --git a/recipes-rt/images/core-image-rt.bb b/recipes-rt/images/core-image-rt.bb
index 4db0a579..1578c9e6 100644
--- a/recipes-rt/images/core-image-rt.bb
+++ b/recipes-rt/images/core-image-rt.bb
@@ -10,7 +10,7 @@ python () {
10 10
11DESCRIPTION = "A small image just capable of allowing a device to boot plus a \ 11DESCRIPTION = "A small image just capable of allowing a device to boot plus a \
12real-time test suite and tools appropriate for real-time use." 12real-time test suite and tools appropriate for real-time use."
13DEPENDS = "linux-intel-rt" 13DEPENDS += "linux-intel-rt"
14 14
15IMAGE_INSTALL += "rt-tests hwlatdetect" 15IMAGE_INSTALL += "rt-tests hwlatdetect"
16 16
diff --git a/recipes-selftest/images/secureboot-selftest-image-unsigned.bb b/recipes-selftest/images/secureboot-selftest-image-unsigned.bb
index e03e7b47..d0fa6405 100644
--- a/recipes-selftest/images/secureboot-selftest-image-unsigned.bb
+++ b/recipes-selftest/images/secureboot-selftest-image-unsigned.bb
@@ -1,12 +1,12 @@
1require recipes-core/images/core-image-minimal.bb 1require recipes-core/images/core-image-minimal.bb
2 2
3DEPENDS_remove = "grub-efi" 3DEPENDS:remove = "grub-efi"
4 4
5inherit uefi-comboapp 5inherit uefi-comboapp
6 6
7WKS_FILE = "generic-bootdisk.wks.in" 7WKS_FILE = "generic-bootdisk.wks.in"
8 8
9do_uefiapp_deploy_append() { 9do_uefiapp_deploy:append() {
10 for i in ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.boot*.efi; do 10 for i in ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.boot*.efi; do
11 target=`basename $i` 11 target=`basename $i`
12 target=`echo $target | sed -e 's/${IMAGE_LINK_NAME}.//'` 12 target=`echo $target | sed -e 's/${IMAGE_LINK_NAME}.//'`
diff --git a/recipes-support/isa-l/isa-l_2.31.0.bb b/recipes-support/isa-l/isa-l_2.31.0.bb
new file mode 100644
index 00000000..d5d09002
--- /dev/null
+++ b/recipes-support/isa-l/isa-l_2.31.0.bb
@@ -0,0 +1,19 @@
1SUMMARY = "Intelligent Storage Acceleration Library"
2DESCRIPTION = "ISA-L is a collection of optimized low-level functions \
3targeting storage applications."
4LICENSE = "BSD-3-Clause"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=2476688d0948d4a3f7c69473a603540d"
6SECTION = "lib"
7
8inherit autotools pkgconfig
9
10S = "${WORKDIR}/git"
11SRCREV = "bd226375027899087bd48f3e59b910430615cc0a"
12SRC_URI = "git://github.com/intel/isa-l.git;branch=master;protocol=https"
13
14DEPENDS = "nasm-native"
15AS[unexport] = "1"
16
17TARGET_CC_ARCH += "${LDFLAGS}"
18
19COMPATIBLE_HOST = '(x86_64).*-linux'
diff --git a/recipes-support/libipt/libipt_2.1.1.bb b/recipes-support/libipt/libipt_2.1.1.bb
new file mode 100644
index 00000000..205967c1
--- /dev/null
+++ b/recipes-support/libipt/libipt_2.1.1.bb
@@ -0,0 +1,34 @@
1SUMMARY = "Intel(R) Processor Trace Decoder Library"
2DESCRIPTION = "The Intel Processor Trace (Intel PT) Decoder Library is Intel's \
3reference implementation for decoding Intel PT. It can be used as a standalone \
4library or it can be partially or fully integrated into your tool."
5HOMEPAGE = "https://github.com/intel/libipt"
6
7LICENSE = "BSD-3-Clause"
8LIC_FILES_CHKSUM = "file://LICENSE;md5=a429afa59f273b5d12778eda69d10313"
9
10inherit pkgconfig cmake
11
12S = "${WORKDIR}/git"
13
14SRC_URI = "git://github.com/intel/libipt.git;protocol=https;branch=stable/v2.1"
15
16SRCREV = "1c9bc700f4b9a71fd2d1cf1742de7e2351ddb281"
17
18EXTRA_OECMAKE += " \
19 -DPTDUMP=ON \
20 -DPTTC=ON \
21 -DPTSEG=ON \
22 -DCMAKE_SKIP_RPATH=ON \
23 "
24
25do_install:append() {
26 install -d ${D}${bindir}/libipt
27 install -d ${D}${bindir}/libipt/tests
28
29 cp -r ${B}/bin/* ${D}${bindir}/libipt/
30 cp -r ${WORKDIR}/git/test/src/* ${D}${bindir}/libipt/tests
31}
32
33FILES:${PN}-test = "${bindir}"
34PACKAGES =+ "${PN}-test"
diff --git a/recipes-support/sbsigntool/sbsigntool-native_git.bb b/recipes-support/sbsigntool/sbsigntool-native_git.bb
index 430a6a78..5a9f5b4d 100644
--- a/recipes-support/sbsigntool/sbsigntool-native_git.bb
+++ b/recipes-support/sbsigntool/sbsigntool-native_git.bb
@@ -1,5 +1,5 @@
1DESCRIPTION = "Utility for signing and verifying files for UEFI Secure Boot" 1DESCRIPTION = "Utility for signing and verifying files for UEFI Secure Boot"
2LICENSE = "GPLv3 & LGPL-2.1 & LGPL-3.0 & MIT" 2LICENSE = "GPL-3.0-only & LGPL-2.1-only & LGPL-3.0-only & MIT"
3 3
4# sbsigntool statically links to libccan.a which is built with modules 4# sbsigntool statically links to libccan.a which is built with modules
5# passed to "create-ccan-tree" (and their dependencies). Therefore, 5# passed to "create-ccan-tree" (and their dependencies). Therefore,
@@ -19,25 +19,29 @@ LIC_FILES_CHKSUM = "file://LICENSE.GPLv3;md5=9eef91148a9b14ec7f9df333daebc746 \
19 19
20# The original upstream is git://kernel.ubuntu.com/jk/sbsigntool but it has 20# The original upstream is git://kernel.ubuntu.com/jk/sbsigntool but it has
21# not been maintained and many patches have been backported in this repo. 21# not been maintained and many patches have been backported in this repo.
22SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/jejb/sbsigntools.git;protocol=https;name=sbsigntools \ 22SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/jejb/sbsigntools.git;protocol=https;name=sbsigntools;branch=master \
23 git://github.com/rustyrussell/ccan.git;protocol=https;destsuffix=git/lib/ccan.git;name=ccan \ 23 git://github.com/rustyrussell/ccan.git;protocol=https;destsuffix=git/lib/ccan.git;name=ccan;branch=master \
24 " 24 file://0001-configure-Fixup-build-dependencies-for-cross-compili.patch \
25 "
25 26
26SRCREV_sbsigntools ?= "efbb550858e7bd3f43e64228d22aea440ef6a14d" 27SRCREV_sbsigntools ?= "9cfca9fe7aa7a8e29b92fe33ce8433e212c9a8ba"
27SRCREV_ccan ?= "b1f28e17227f2320d07fe052a8a48942fe17caa5" 28SRCREV_ccan ?= "b1f28e17227f2320d07fe052a8a48942fe17caa5"
28SRCREV_FORMAT = "sbsigntools_ccan" 29SRCREV_FORMAT = "sbsigntools_ccan"
29 30
30DEPENDS = "binutils-native gnu-efi-native help2man-native openssl10-native util-linux-native" 31DEPENDS = "binutils-native gnu-efi-native help2man-native openssl-native util-linux-native"
31 32
32PV = "0.8-git${SRCPV}" 33PV = "0.9.5"
33 34
34S = "${WORKDIR}/git" 35S = "${WORKDIR}/git"
35 36
36inherit native autotools pkgconfig 37inherit autotools pkgconfig
38inherit native
37 39
38do_configure_prepend() { 40do_configure:prepend() {
39 cd ${S} 41 cd ${S}
40 42
43 sed -i s#RECIPE_SYSROOT#${RECIPE_SYSROOT_NATIVE}#g configure.ac
44
41 if [ ! -e lib/ccan ]; then 45 if [ ! -e lib/ccan ]; then
42 46
43 # Use empty SCOREDIR because 'make scores' is not run. 47 # Use empty SCOREDIR because 'make scores' is not run.
@@ -75,3 +79,5 @@ EXTRA_OEMAKE = "\
75 -I${STAGING_INCDIR_NATIVE} \ 79 -I${STAGING_INCDIR_NATIVE} \
76 -I${STAGING_INCDIR_NATIVE}/efi/${@efi_arch(d)}' \ 80 -I${STAGING_INCDIR_NATIVE}/efi/${@efi_arch(d)}' \
77 " 81 "
82
83CFLAGS:append = " -Wno-error"
diff --git a/recipes-support/sbsigntool/sbsigntool/0001-configure-Fixup-build-dependencies-for-cross-compili.patch b/recipes-support/sbsigntool/sbsigntool/0001-configure-Fixup-build-dependencies-for-cross-compili.patch
new file mode 100644
index 00000000..ea7bee29
--- /dev/null
+++ b/recipes-support/sbsigntool/sbsigntool/0001-configure-Fixup-build-dependencies-for-cross-compili.patch
@@ -0,0 +1,54 @@
1From c3533b8da1e1425801d2fc0bcd231e13d593f16b Mon Sep 17 00:00:00 2001
2From: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
3Date: Tue, 19 Feb 2019 20:07:45 +0800
4Subject: [PATCH] configure: Fixup build dependencies for cross-compiling
5
6When cross-compiling, custom header files and libraries need to be
7specified. sbsign assumes that all the dependencies are located
8under /usr/include and /usr/lib.
9
10Prepend these paths with a placeholder that can be replaced with the
11actual paths once they are resolved.
12
13Upstream-Status: Inappropriate [OE specific]
14
15Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
16
17Taken from :
18https://github.com/intel/luv-yocto/tree/master/meta-luv/recipes-devtools/sbsigntool/sbsigntool
19
20Corrected typo error and ported to version 0.9.2
21
22Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
23---
24 configure.ac | 7 +++++--
25 1 file changed, 5 insertions(+), 2 deletions(-)
26
27diff --git a/configure.ac b/configure.ac
28index 1459e91..3e34c8d 100644
29--- a/configure.ac
30+++ b/configure.ac
31@@ -70,7 +70,10 @@ AM_CONDITIONAL(TEST_BINARY_FORMAT, [ test "$EFI_ARCH" = "arm" -o "$EFI_ARCH" = "
32 ##
33 # no consistent view of where gnu-efi should dump the efi stuff, so find it
34 ##
35-for path in /lib /lib64 /usr/lib /usr/lib64 /usr/lib32 /lib/efi /lib64/efi /usr/lib/efi /usr/lib64/efi /usr/lib/gnuefi /usr/lib64/gnuefi ; do
36+for path in RECIPE_SYSROOT/lib RECIPE_SYSROOT/lib64 RECIPE_SYSROOT/usr/lib \
37+ RECIPE_SYSROOT/usr/lib64 RECIPE_SYSROOT/usr/lib32 \
38+ RECIPE_SYSROOT/lib/efi RECIPE_SYSROOT/lib64/efi \
39+ RECIPE_SYSROOT/usr/lib/efi RECIPE_SYSROOT/usr/lib64/efi; do
40 if test -e $path/crt0-efi-$EFI_ARCH.o; then
41 CRTPATH=$path
42 fi
43@@ -79,7 +82,7 @@ if test -z "$CRTPATH"; then
44 AC_MSG_ERROR([cannot find the gnu-efi crt path])
45 fi
46
47-EFI_CPPFLAGS="-I/usr/include/efi -I/usr/include/efi/$EFI_ARCH \
48+EFI_CPPFLAGS="-IRECIPE_SYSROOT/usr/include/efi -IRECIPE_SYSROOT/usr/include/efi/$EFI_ARCH \
49 -DEFI_FUNCTION_WRAPPER"
50 CPPFLAGS_save="$CPPFLAGS"
51 CPPFLAGS="$CPPFLAGS $EFI_CPPFLAGS"
52--
532.7.4
54
diff --git a/wic/grub-bootdisk-microcode.wks.in b/wic/grub-bootdisk-microcode.wks.in
new file mode 100644
index 00000000..7dc66f98
--- /dev/null
+++ b/wic/grub-bootdisk-microcode.wks.in
@@ -0,0 +1,12 @@
1# short-description: Create an EFI disk image with grub-efi
2# long-description: Creates a partitioned EFI disk image that the user
3# can directly dd to boot media. The selected bootloader is grub-efi.
4# It also includes intel-microcode as an initrd for early update support.
5
6part /boot --source bootimg-efi --sourceparams="loader=grub-efi,initrd=microcode.cpio" --ondisk sda --label msdos --active --align 1024 --use-uuid
7
8part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --use-uuid
9
10part swap --ondisk sda --size 44 --label swap1 --fstype=swap --use-uuid
11
12bootloader --ptable gpt --timeout=5 --append=" rootfstype=ext4 "
diff --git a/wic/image-installer.wks.in b/wic/image-installer.wks.in
new file mode 100644
index 00000000..933e8d85
--- /dev/null
+++ b/wic/image-installer.wks.in
@@ -0,0 +1,8 @@
1# create an installer disk image
2# populate content to install using IMAGE_BOOT_FILES
3
4part /boot --source bootimg-efi --sourceparams="loader=${EFI_PROVIDER},title=install,label=install-efi,initrd=microcode.cpio;${INITRD_IMAGE_LIVE}-${MACHINE}.${INITRAMFS_FSTYPES}" --ondisk sda --label install --active --align 1024 --use-uuid
5
6part / --source bootimg-partition --ondisk sda --fstype=ext4 --label image --use-uuid --align 1024
7
8bootloader --ptable gpt --timeout=5 --append=" rootwait "
diff --git a/wic/systemd-bootdisk-microcode.wks b/wic/systemd-bootdisk-microcode.wks.in
index c171fd8e..925c1fa3 100644
--- a/wic/systemd-bootdisk-microcode.wks
+++ b/wic/systemd-bootdisk-microcode.wks.in
@@ -10,4 +10,4 @@ part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024
10 10
11part swap --ondisk sda --size 44 --label swap1 --fstype=swap --use-uuid 11part swap --ondisk sda --size 44 --label swap1 --fstype=swap --use-uuid
12 12
13bootloader --ptable gpt --timeout=5 --append="rootwait rootfstype=ext4 console=ttyS0,115200 console=tty0" 13bootloader --ptable gpt --timeout=5 --append=" rootfstype=ext4 "