diff options
246 files changed, 16473 insertions, 0 deletions
diff --git a/CHANGELOG b/CHANGELOG new file mode 100644 index 00000000..9b38eb5c --- /dev/null +++ b/CHANGELOG @@ -0,0 +1,43 @@ +This file will only list major changes that occur within a release. +For a full list of changes, view the git log of the repository. + +Pyro Release 5/2017 +=================== + +Changed default kernel provider from linux-yocto to linux-intel. +---------------------------------------------------------------- +Linux-intel is an Intel(R)-maintained kernel based on the latest stable +branch, along with backports from upstream to better support Intel(R) +hardware. The intel-linux kernel also has a branch with the preempt-rt +patches applied, providing a preempt-rt kernel with no additional work. + +Added QEMU support. +------------------- +We now build several virtio drivers into the kernel by default, and +have qemuboot.conf files for intel-corei7-64 and intel-core2-32 +targets. This allows one to do basic testing on meta-intel images +without having to use hardware. The virtio drivers are added via +KERNEL_FEATURES_INTEL_COMMON. This prevents them from being added to +custom kernels by default. They can be removed by adding the +following to a conf or kernel bbappend file: + KERNEL_FEATURES_INTEL_COMMON_remove = “cfg/virtio.scc†+OVMF firmware is also built and can be used in order to emulate a UEFI +environment. A full runqemu command line for intel-corei7-64 could look +like this: + runqemu core-image-minimal intel-corei7-64 wic ovmf + +Musl support +------------ +Meta-intel is now compatible with the musl C library. You can specify musl +As your C library by adding the following to your local.conf: + TCLIBC = “musl†+Note: there is a known failure with DPDK. + +X32 support +----------- +The meta-intel layer can now build with the x32 tune settings in a multi-lib +setting, it will not work in as the primary MACHINE tune as the bootloader needs +to be built as a 64bit binary. The setup for this would be as follows: + require conf/multilib.conf + MULTILIBS = "multilib:libx32 + DEFAULTTUNE_virtclass-multilib-libx32 = "corei7-64-x32" diff --git a/COPYING.MIT b/COPYING.MIT new file mode 100644 index 00000000..fb950dc6 --- /dev/null +++ b/COPYING.MIT @@ -0,0 +1,17 @@ +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..e57d3b90 --- /dev/null +++ b/LICENSE @@ -0,0 +1,5 @@ +All metadata files (including, but not limited to bb, bbappend, +bbclass, inc and conf files) are MIT licensed unless otherwise stated. +Source code included in tree for individual recipes is under the +LICENSE stated in the associated recipe (.bb file) unless otherwise +stated. diff --git a/MAINTAINERS b/MAINTAINERS new file mode 100644 index 00000000..443041d6 --- /dev/null +++ b/MAINTAINERS @@ -0,0 +1,36 @@ +This file contains a list of BSP maintainers for the BSPs contained in +the meta-intel repository. + +The purpose of this file is to provide contact information for +specific BSPs and other code contained within meta-intel. You should +address questions and patches for a particular BSP or other code to +the appropriate maintainer listed in this file, cc'ing the meta-intel +mailing list. This ensures that your question or patch will be +addressed by the appropriate person, and that it will be seen by other +users who may be facing similar problems or questions. + +Please see the top-level README file for guidelines relating to the +details of submitting patches, reporting problems, or asking questions +about any of the BSPs or other recipes contained within meta-intel. + +Descriptions of section entries: + + M: Mail patches to: FullName <address@domain> + F: Files and directories with wildcard patterns. + A trailing slash includes all files and subdirectory files. + F: common/ all files in and below common + F: common/* all files in common, but not below + One pattern per line. Multiple F: lines acceptable. + +Please keep this list in alphabetical order. + +Maintainers List (try to look for most precise areas first) + + ----------------------------------- +COMMON +M: Saul Wold <sgw@linux.intel.com> +F: common/ + +TLK +M: Saul Wold <sgw@linux.intel.com> +F: meta-tlk/ @@ -0,0 +1,481 @@ +meta-intel +========== + +This README file contains information on building and booting +meta-intel BSP layers. Please see the corresponding sections below +for details. + + +Yocto Project Compatible +======================== + +The BSPs contained in this layer are compatible with the Yocto Project +as per the requirements listed here: + + https://www.yoctoproject.org/webform/yocto-project-compatible-registration + + +Dependencies +============ + +This layer depends on: + + URI: git://git.openembedded.org/bitbake + branch: 1.34 + + URI: git://git.openembedded.org/openembedded-core + layers: meta + branch: rocko + + +Table of Contents +================= + + I. Overview + II. Building and booting meta-intel BSP layers + a. Building the intel-common and quark BSP layers + b. Booting the intel-common BSP images + c. Booting the intel-quark BSP image on a Galileo board + III. Technical Miscellany + Benefits of using meta-intel + The intel-common kernel package architecture + Intel-specific machine features + IV. Tested Hardware + V. Guidelines for submitting patches + + +I. Overview +=========== + +This is the location for Intel-maintained BSPs. + +For details on the intel-common and intel-quark BSPs, see the +information below. + +For all others, please see the README files contained in the +individual BSP layers for BSP-specific information. + +If you have problems with or questions about a particular BSP, please +contact the maintainer listed in the MAINTAINERS file directly (cc:ing +the Yocto mailing list puts it in the archive and helps other people +who might have the same questions in the future), but please try to do +the following first: + + - look in the Yocto Project Bugzilla + (http://bugzilla.yoctoproject.org/) to see if a problem has + already been reported + + - look through recent entries of the meta-intel + (https://lists.yoctoproject.org/pipermail/meta-intel/) and Yocto + (https://lists.yoctoproject.org/pipermail/yocto/) mailing list + archives to see if other people have run into similar problems or + had similar questions answered. + +If you believe you have encountered a bug, you can open a new bug and +enter the details in the Yocto Project Bugzilla +(http://bugzilla.yoctoproject.org/). If you're relatively certain +that it's a bug against the BSP itself, please use the 'Yocto Project +Components: BSPs | meta-intel' category for the bug; otherwise, please +submit the bug against the most likely category for the problem - if +you're wrong, it's not a big deal and the bug will be recategorized +upon triage. + + +II. Building and booting meta-intel BSP layers +============================================== + +The following sections contain information on building and booting the +BSPs contained in the meta-intel layer. + +Note that these instructions specifically cover the intel-common and +quark BSPs, which may or may not be applicable to other BSPs contained +in this layer - if a given BSP contains its own README, that version +should be used instead, and these instructions can be ignored. + +a. Building the intel-common and quark BSP layers +------------------------------------------------- + +In order to build an image with BSP support for a given release, you +need to download the corresponding BSP tarball from the 'Board Support +Package (BSP) Downloads' page of the Yocto Project website (or +equivalently, check out the appropriate branch from the meta-intel git +repository, see below). For the intel-common and quark BSPs, those +tarballs would correspond to the following choices in the BSP +downloads section: + + - Intel-core2-32 Intel® Common Core BSP (Intel-core2-32) + - Intel-core2-32 Intel® Common Core BSP (Intel-quark) + - Intel-corei7-64 Intel® Common Core BSP (Intel-corei7-64) + +The intel-* BSPs, also known as the intel-common BSPs, provide a few +carefully selected tune options and generic hardware support to cover +the majority of current Intel CPUs and devices. The naming follows the +convention of intel-<TUNE>-<BITS>, where TUNE is the gcc cpu-type +(used with mtune and march typically) and BITS is either 32 bit or 64 +bit. + +Having done that, and assuming you extracted the BSP tarball contents +at the top-level of your yocto build tree, you can build a BSP image +by adding the location of the meta-intel layer to bblayers.conf e.g.: + + yocto/meta-intel \ + +To enable a particular machine, you need to add a MACHINE line naming +the BSP to the local.conf file: + + MACHINE ?= "xxx" + +where 'xxx' is replaced by one of the following BSP names: + + - intel-core2-32 + + This BSP is optimized for the Core2 family of CPUs as well as all + Atom CPUs prior to the Silvermont core. + + - intel-corei7-64 + + This BSP is optimized for Nehalem and later Core and Xeon CPUs as + well as Silvermont and later Atom CPUs, such as the Baytrail SoCs. + + - intel-quark + + This BSP is optimized for Quark-based systems. + +You should then be able to build an image as such: + + $ source oe-init-build-env + $ bitbake core-image-sato + +At the end of a successful build, you should have an image that +you can boot from a USB flash drive (see instructions on how to do +that below, in the section 'Booting the intel-common BSP images'). + +As an alternative to downloading the BSP tarball, you can also work +directly from the meta-intel git repository. For each BSP in the +'meta-intel' repository, there are multiple branches, one +corresponding to each major release starting with 'laverne' (0.90), in +addition to the latest code which tracks the current master (note that +not all BSPs are present in every release). Instead of extracting +a BSP tarball at the top level of your yocto build tree, you can +equivalently check out the appropriate branch from the meta-intel +repository at the same location. + +b. Booting the intel-common BSP images +-------------------------------------- + +If you downloaded the BSP tarball, you will find bootable images in +the /binary directory. If you've built your own image, either from +the downloaded BSP layer or from the meta-intel git repository, you'll +find the bootable image in the build/tmp/deploy/images/xxx directory, +where again 'xxx' refers to the machine name used in the build. + +The BSP /binary directory or build contains bootable live images, +which can be used to directly boot Yocto off of a USB flash drive. + +Under Linux, insert a USB flash drive. Assuming the USB flash drive +takes device /dev/sdf, use dd to copy the image to it. For example: + + $ dd if=core-image-sato-intel-corei7-64.wic of=/dev/sdf + $ sync + $ eject /dev/sdf + +This should give you a bootable USB flash device. Insert the device +into a bootable USB socket on the target, and power on. This should +result in a system booted to the Sato graphical desktop. + +If you want a terminal, use the arrows at the top of the UI to move to +different pages of available applications, one of which is named +'Terminal'. Clicking that should give you a root terminal. + +If you want to ssh into the system, you can use the root terminal to +ifconfig the IP address and use that to ssh in. The root password is +empty, so to log in type 'root' for the user name and hit 'Enter' at +the Password prompt: and you should be in. + +If you find you're getting corrupt images on the USB (it doesn't show +the syslinux boot: prompt, or the boot: prompt contains strange +characters), try doing this first: + + $ dd if=/dev/zero of=/dev/sdf bs=1M count=512 + +c. Booting the intel-quark BSP image on a Galileo board +------------------------------------------------------- + +If you downloaded the BSP tarball, you will find bootable images in +the /binary directory. If you've built your own image, either from +the downloaded BSP layer or from the meta-intel git repository, you'll +find the bootable image in the build/tmp/deploy/images/xxx directory, +where again 'xxx' refers to the machine name used in the build. + +The Galileo board can boot off of either an SD card or USB storage +media that has a special disk layout. The 'wic' tool can be used to +create directly bootable images for either of the two formats via the +following steps. As of meta-intel 6.0-morty-2.2 or newer, wic images are +created automatically during build time, and the manual use of wic is +not necessary. By default, the galileodisk-sd wic kickstart file is used, +which targets SD cards. This can be changed by setting the WKS_FILE to +something else in local.conf, such as the following: + +WKS_FILE = “galileodisk-usb†+ +If your build is successful, a .wic image will be created in the usual +deploy directory. Write this image to an SD card: + + $ sudo dd if=/path/to/image/image-name.wic of=/dev/your_sd_dev + $ sync + $ sudo eject /dev/your_sd_dev + +Insert the SD card into the Galileo and power on. + +The Galileo board can boot from an hddimg formatted USB drive as well, +but currently only live-boot, and not installation, is supported. +An image in hddimg format is generated when you build the quark BSP. +You can follow the procedure in II.b to use dd command to prepare your USB +drive, then press F7 key during startup to bring up the boot option menu. +Choose the UEFI USB boot option for the drive to boot the system. If the board +already passes this stage and show a grub boot menu, you can press 'c' +key and then type "quit" in grub shell. The board should come back to +the UEFI boot menu. + +III. Technical Miscellany +========================= + +Benefits of using meta-intel +---------------------------- + +Using meta-intel has the following benefits over a generic BSP: + +tune flags +++++++++++ +intel-* MACHINEs each have different compilation flags appropriate for their +targeted hardware sets. intel-corei7-64 has tune flags appropriate for modern +64-bit Intel Core i microarchitecture, and includes instruction sets up to +SSE4.2. intel-core2-32 has tune flags appropriate for legacy 32-bit Intel Core2 +microarchitecture, and includes instruction sets up to SSE3. intel-quark +contains a subset of the intel-core2-32 instruction set, as quark does not +support prefix locking instructions. + +linux-intel kernel +++++++++++++++++++ +The linux-intel kernel is an initiative to bring better Intel(R) hardware +support to the current LTS linux kernel. It contains a base LTS kernel with +additional backports from upstream Intel drivers. In addition, a default kernel +config containing most features found on Intel boards is supplied via the +yocto-kernel-cache. + +graphics stack +++++++++++++++ +Meta-intel provides the latest Intel Graphics Linux Stack drivers to support +Intel hardware as defined by the https://01.org/linuxgraphics. + +Other software +++++++++++++++ + * intel ucode - provides the latest microcode updates for Intel processors + + * thermald - which proactively controls thermal, using P-states, T-states, and +the Intel power clamp driver. +(https://01.org/linux-thermal-daemon/documentation/introduction-thermal-daemon) + + * RMC - Runtime Machine Configuration, which allows the bootload to determine +board and CPU information in order to set specific kernel command line +information at startup. + +The intel-common kernel package architecture +-------------------------------------------- + +These BSPs use what we call the intel-common Linux kernel package +architecture. This includes core2-32-intel-common and +corei7-64-intel-common. These kernel packages can also be used by any +of the BSPs in meta-intel that choose to include the +intel-common-pkgarch.inc file. + +To minimize the proliferation of vendor trees, reduce the sources we +must support, and consolidate QA efforts, all BSP maintainers are +encouraged to make use of the intel-common Linux kernel package +architecture. + +Intel-specific machine features +------------------------------- + +The meta-intel layer makes some additional machine features available +to BSPs. These machine features can be used in a BSP layer in the +same way that machine features are used in other layers based on +oe-core, via the MACHINE_FEATURES variable. + +Requirements +++++++++++++ + +The meta-intel-specific machine features are only available to a BSP +when the meta-intel layer is included in the build configuration, and +the meta-intel.inc file is included in the machine configuration of +that BSP. + +To make these features available for your machine, you will need to: + + 1. include a configuration line such as the below in bblayers.conf + BBLAYERS += "<local path>/meta-intel" + 2. include the following line in the machine configuration file + require conf/machine/include/meta-intel.inc + +Once the above requirements are met, the machine features provided by +the meta-intel layer will be available for the BSP to use. + +Available machine features +++++++++++++++++++++++++++ + +Currently, the meta-intel layer makes the following set of +Intel-specific machine features available: + + * intel-ucode + +These machine features can be included by listing them in the +MACHINE_FEATURES variable in the machine configuration file. For +example: + + MACHINE_FEATURES += "intel-ucode" + +Machine feature details ++++++++++++++++++++++++ + + * intel-ucode + + This feature provides support for microcode updates to Intel + processors. The intel-ucode feature runs at early boot and uses + the microcode data file added by the feature into the BSP's + initrd. It also puts the userland microcode-updating tool, + iucode_tool, into the target images along with the microcode data + file. + + Q. Why might a user want to enable the intel-ucode feature? + + A. Intel releases microcode updates to correct processor behavior + as documented in the respective processor specification + updates. While the normal approach to getting such microcode + updates is via a BIOS upgrade, this can be an administrative + hassle and not always possible in the field. The intel-ucode + feature enables the microcode update capability present in the + Linux kernel. It provides an easy path for upgrading processor + microcode without the need to change the BIOS. If the feature + is enabled, it is also possible to update the existing target + images with a newer microcode update in the future. + + Q. How would a user bundle only target-specific microcode in the + target image? + + A. The Intel microcode data file released by Intel contains + microcode updates for multiple processors. If the BSP image is + meant to run on only a certain subset of processor types, a + processor-specific subset of microcode can be bundled into the + target image via the UCODE_FILTER_PARAMETERS variable. This + works by listing a sequence of iucode-tool parameters in the + UCODE_FILTER_PARAMETERS variable, which in this case will + select only the specific microcode relevant to the BSP. For + more information on the underlying parameters refer to the + iucode-tool manual page at http://manned.org/iucode-tool + + To define a set of parameters for microcode-filtering via the + UCODE_FILTER_PARAMETERS variable, one needs to identify the + cpuid signatures of all the processors the BSP is meant to run + on. One way to determine the cpuid signature for a specific + processor is to build and run an intel-ucode-feature-enabled + image on the target hardware, without first assigning any value + to the UCODE_FILTER_PARAMETERS variable, and then once the + image is booted, run the "ucode_tool -S" command to have the + ucode tool scan the system for processor signatures. These + signatures can then be used in the UCODE_FILTER_PARAMETERS + variable in conjunction with -s parameter. For example, for + the fri2 BSP, the cpuid can be determined as such: + + [root@fri2 ~]# iucode_tool -S + iucode_tool: system has processor(s) with signature 0x00020661 + + Given that output, a suitable UCODE_FILTER_PARAMETERS variable + definition could be specified in the machine configuration as + such: + + UCODE_FILTER_PARAMETERS = "-s 0x00020661" + + Q. Are there any reasons a user might want to disable the + intel-ucode feature? + + A. The microcode data file and associated tools occupy a small + amount of space (a few KB) on the target image. BSPs which are + highly sensitive to target image size and which are not + experiencing microcode-related issues might consider not + enabling this feature. + + +IV. Tested Hardware +=================== + +The following undergo regular basic testing with their respective MACHINE types. +Note that both 64-bit and 32-bit firmware is available for the MinnowBoard +Turbot, so it is tested against both intel-corei7-64 and intel-core2-32. + +intel-corei7-64: + NUC6i5SYH + MinnowBoard Turbot + Braswell RVP + +intel-core2-32: + MinnowBoard Turbot + +Intel-quark: + Galileo 2 + + +V. Guidelines for submitting patches +==================================== + +Please submit any patches against meta-intel BSPs to the meta-intel +mailing list (meta-intel@yoctoproject.org). Also, if your patches are +available via a public git repository, please also include a URL to +the repo and branch containing your patches as that makes it easier +for maintainers to grab and test your patches. + +There are patch submission scripts available that will, among other +things, automatically include the repo URL and branch as mentioned. +Please see the Yocto Project Development Manual sections entitled +'Using Scripts to Push a Change Upstream and Request a Pull' and +'Using Email to Submit a Patch' for details. + +Regardless of how you submit a patch or patchset, the patches should +at minimum follow the suggestions outlined in the 'Submitting a Change +to the Yocto Project' section in the Yocto Project Development Manual. +Specifically, they should: + + - Include a 'Signed-off-by:' line. A commit can't legally be pulled + in without this. + + - Provide a single-line, short summary of the change. This short + description should be prefixed by the BSP or recipe name, as + appropriate, followed by a colon. Capitalize the first character + of the summary (following the colon). + + - For the body of the commit message, provide detailed information + that describes what you changed, why you made the change, and the + approach you used. + + - If the change addresses a specific bug or issue that is associated + with a bug-tracking ID, include a reference to that ID in your + detailed description in the following format: [YOCTO #<bug-id>]. + + - Pay attention to line length - please don't allow any particular + line in the commit message to stretch past 72 characters. + + - For any non-trivial patch, provide information about how you + tested the patch, and for any non-trivial or non-obvious testing + setup, provide details of that setup. + +Doing a quick 'git log' in meta-intel will provide you with many +examples of good example commits if you have questions about any +aspect of the preferred format. + +The meta-intel maintainers will do their best to review and/or pull in +a patch or patchset within 24 hours of the time it was posted. For +larger and/or more involved patches and patchsets, the review process +may take longer. + +Please see the meta-intel/MAINTAINERS file for the list of maintainers +and their specific areas; it's also a good idea to cc: the specific +maintainer, if applicable. diff --git a/README.sources b/README.sources new file mode 100644 index 00000000..ee72e543 --- /dev/null +++ b/README.sources @@ -0,0 +1,17 @@ +The sources for the packages comprising the images shipped with this +BSP can be found at the following location: + +http://downloads.yoctoproject.org/mirror/sources/ + +The metadata used to generate the images shipped with this BSP, in +addition to the code contained in this BSP, can be found at the +following location: + +http://downloads.yoctoproject.org/releases/yocto/yocto-2.1/poky-krogoth-15.0.tar.bz2 + +The metadata used to generate the images shipped with this BSP, in +addition to the code contained in this BSP, can also be found at the +following locations: + +git://git.yoctoproject.org/poky.git +git://git.yoctoproject.org/meta-intel diff --git a/classes/rmc-boot.bbclass b/classes/rmc-boot.bbclass new file mode 100644 index 00000000..37c3e30c --- /dev/null +++ b/classes/rmc-boot.bbclass @@ -0,0 +1,17 @@ +# rmc-boot bbclass +# Deploy central RMC database file to ESP + +IMAGE_INSTALL_append = " rmc" +RMC_BOOTLOADER ?= "systemd-boot" + +inherit ${RMC_BOOTLOADER} + +do_bootimg[depends] += "${MLPREFIX}rmc-db:do_deploy" + +efi_populate_append() { + if [ -f ${DEPLOY_DIR_IMAGE}/rmc.db ]; then + install -m 0400 ${DEPLOY_DIR_IMAGE}/rmc.db ${DEST}/rmc.db + else + rm -f ${DEST}/rmc.db + fi +} diff --git a/classes/rmc-db.bbclass b/classes/rmc-db.bbclass new file mode 100644 index 00000000..72594d69 --- /dev/null +++ b/classes/rmc-db.bbclass @@ -0,0 +1,92 @@ +# RMC database bbclass +# provide functions to generate RMC database file on build host (native) + +DEPENDS += "rmc-native" + +# rmc_generate_db() +# $1: a list of directories. Each directory holds directories for a group of +# boards. +# $2: path_name of rmc generates database file and records +# +# WARNING: content of directory of database file will be removed. +# +# Each board directory shall contain a fingerprint file (*.fp) at least, with +# optional file blob(s) associated to the type of board. If a board directory +# has no file blob, no record is created for that board. +# +# An example of two directories each of which contains two boards for RMC: +# (All file and directory names are for illustration purpose.) +# +# dir_1/ +# board_1/ +# board_1_fingerprint.fp +# file_1.blob +# board_2/ +# board_2.fp +# dir_2/ +# board_3/ +# b3.fp +# file_1.blob +# file_2.conf +# board_4/ +# board_foo.fp +# mylib.config +# +# To generate a RMC database "rmc.db" with data of all (actually 3) of boards in +# a directory "deploy_dir": +# +# rmc_generate_db "dir_1 dir_2" "deploy_dir/rmc.db" +# +# The board_2 will be skipped. No record or any data for it is packed in +# generated database because it only contains a fingerprint file. +# + +rmc_generate_db () { + RMC_BOARD_DIRS=$1 + + if [ "$#" -ne 2 ]; then + echo "rmc_generate_db(): Wrong number of arguments: $#" + return 1 + fi + + RMC_DB_DIR=$(dirname "$2") + RMC_RECORDS="" + + rm -rf ${RMC_DB_DIR} + mkdir -p ${RMC_DB_DIR} + + # generate rmc database + for topdir in ${RMC_BOARD_DIRS}; do + # For all board dirs in a topdir: + CUR_BOARD_DIRS=$(find ${topdir}/* -type d) + for board_dir in ${CUR_BOARD_DIRS}; do + CUR_FINGERPRINT=$(find ${board_dir}/ -name "*.fp") + + # disallow a board directory without any fingerprint file in it. + if [ -z "${CUR_FINGERPRINT}" ]; then + echo "Cannot find RMC fingerprint file in ${board_dir}" + return 1 + fi + + CUR_FILES=$(find ${board_dir}/ -type f |grep -v '\.fp$' || true) + + # allow a directory only with fingerprint file. Developer may + # check in fingerprint for future use. + if [ -z "${CUR_FILES}" ]; then + continue + fi + + for fp in ${CUR_FINGERPRINT}; do + fullname=$(basename ${fp}) + CUR_TAG="${fullname%.*}" + CUR_RECORD=${RMC_DB_DIR}/${CUR_TAG}.rec + rmc -R -f ${fp} -b ${CUR_FILES} -o ${CUR_RECORD} + RMC_RECORDS="${RMC_RECORDS} ${CUR_RECORD}" + done + done + done + + if [ ! -z "${RMC_RECORDS}" ]; then + rmc -D ${RMC_RECORDS} -o "$2" + fi +} diff --git a/classes/uefi-comboapp.bbclass b/classes/uefi-comboapp.bbclass new file mode 100644 index 00000000..5c3ca8c9 --- /dev/null +++ b/classes/uefi-comboapp.bbclass @@ -0,0 +1,151 @@ +# This class brings a more generic version of the UEFI combo app from refkit to meta-intel. +# It uses a combo file, containing kernel, initramfs and +# command line, presented to the BIOS as UEFI application, by prepending +# it with the efi stub obtained from systemd-boot. + +# Don't add syslinux or build an ISO +PCBIOS_forcevariable = "0" +NOISO_forcevariable = "1" + +# image-live.bbclass will default INITRD_LIVE to the image INITRD_IMAGE creates. +# We want behavior to be consistent whether or not "live" is in IMAGE_FSTYPES, so +# we default INITRD_LIVE to the INITRD_IMAGE as well. +INITRD_IMAGE ?= "core-image-minimal-initramfs" +INITRD_LIVE ?= " ${@ ('${DEPLOY_DIR_IMAGE}/' + d.getVar('INITRD_IMAGE', expand=True) + '-${MACHINE}.cpio.gz') if d.getVar('INITRD_IMAGE', True) else ''}" + +do_uefiapp[depends] += " \ + intel-microcode:do_deploy \ + systemd-boot:do_deploy \ + virtual/kernel:do_deploy \ + " + +# INITRD_IMAGE is added to INITRD_LIVE, which we use to create our initrd, so depend on it if it is set +do_uefiapp[depends] += "${@ '${INITRD_IMAGE}:do_image_complete' if d.getVar('INITRD_IMAGE') else ''}" + +# The image does without traditional bootloader. +# In its place, instead, it uses a single UEFI executable binary, which is +# composed by: +# - an UEFI stub +# The linux kernel can generate a UEFI stub, however the one from systemd-boot can fetch +# the command line from a separate section of the EFI application, avoiding the need to +# rebuild the kernel. +# - the kernel +# - an initramfs (optional) + +def create_uefiapp(d, uuid=None, app_suffix=''): + import glob, re + from subprocess import check_call + + build_dir = d.getVar('B') + deploy_dir_image = d.getVar('DEPLOY_DIR_IMAGE') + image_link_name = d.getVar('IMAGE_LINK_NAME') + + cmdline = '%s/cmdline.txt' % build_dir + linux = '%s/%s' % (deploy_dir_image, d.getVar('KERNEL_IMAGETYPE')) + initrd = '%s/initrd' % build_dir + + stub_path = '%s/linux*.efi.stub' % deploy_dir_image + stub = glob.glob(stub_path)[0] + m = re.match(r"\S*(ia32|x64)(.efi)\S*", os.path.basename(stub)) + app = "boot%s%s%s" % (m.group(1), app_suffix, m.group(2)) + executable = '%s/%s.%s' % (deploy_dir_image, image_link_name, app) + + if d.getVar('INITRD_LIVE'): + with open(initrd, 'wb') as dst: + for cpio in d.getVar('INITRD_LIVE').split(): + with open(cpio, 'rb') as src: + dst.write(src.read()) + initrd_cmd = "--add-section .initrd=%s --change-section-vma .initrd=0x3000000 " % initrd + else: + initrd_cmd = "" + + root = 'root=PARTUUID=%s' % uuid if uuid else '' + + with open(cmdline, 'w') as f: + f.write('%s %s' % (d.getVar('APPEND'), root)) + + objcopy_cmd = ("objcopy " + "--add-section .cmdline=%s --change-section-vma .cmdline=0x30000 " + "--add-section .linux=%s --change-section-vma .linux=0x40000 " + "%s %s %s") % \ + (cmdline, linux, initrd_cmd, stub, executable) + + check_call(objcopy_cmd, shell=True) + +python create_uefiapps () { + # We must clean up anything that matches the expected output pattern, to ensure that + # the next steps do not accidentally use old files. + import glob + pattern = d.expand('${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.boot*.efi') + for old_efi in glob.glob(pattern): + os.unlink(old_efi) + uuid = d.getVar('DISK_SIGNATURE_UUID') + create_uefiapp(d, uuid=uuid) +} + +# This is intentionally split into different parts. This way, derived +# classes or images can extend the individual parts. We can also use +# whatever language (shell script or Python) is more suitable. +python do_uefiapp() { + bb.build.exec_func('create_uefiapps', d) +} + +do_uefiapp[vardeps] += "APPEND DISK_SIGNATURE_UUID INITRD_LIVE KERNEL_IMAGETYPE IMAGE_LINK_NAME" + +uefiapp_deploy_at() { + dest=$1 + for i in ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.boot*.efi; do + target=`basename $i` + target=`echo $target | sed -e 's/${IMAGE_LINK_NAME}.//'` + cp --preserve=timestamps -r $i $dest/$target + done +} + +do_uefiapp_deploy() { + rm -rf ${IMAGE_ROOTFS}/boot/* + dest=${IMAGE_ROOTFS}/boot/EFI/BOOT + mkdir -p $dest + uefiapp_deploy_at $dest +} + +do_uefiapp_deploy[depends] += "${PN}:do_uefiapp" + + +# This decides when/how we add our tasks to the image +python () { + image_fstypes = d.getVar('IMAGE_FSTYPES', True) + initramfs_fstypes = d.getVar('INITRAMFS_FSTYPES', True) + + # Don't add any of these tasks to initramfs images + if initramfs_fstypes not in image_fstypes: + bb.build.addtask('uefiapp', 'do_image', 'do_rootfs', d) + bb.build.addtask('uefiapp_deploy', 'do_image', 'do_rootfs', d) +} + +SIGN_AFTER ?= "do_uefiapp" +SIGN_BEFORE ?= "do_uefiapp_deploy" +SIGNING_DIR ?= "${DEPLOY_DIR_IMAGE}" +SIGNING_BINARIES ?= "${IMAGE_LINK_NAME}.boot*.efi" +inherit uefi-sign + +# Legacy hddimg support below this line +efi_hddimg_populate() { + uefiapp_deploy_at "$1" +} + +build_efi_cfg() { + # The command line is built into the combo app, so this is a null op + : +} + +populate_kernel_append() { + # The kernel and initrd are built into the app, so we don't need these + if [ -f $dest/initrd ]; then + rm $dest/initrd + fi + if [ -f $dest/vmlinuz ]; then + rm $dest/vmlinuz + fi +} + +IMAGE_FEATURES[validitems] += "secureboot" diff --git a/classes/uefi-sign.bbclass b/classes/uefi-sign.bbclass new file mode 100644 index 00000000..e8f203b9 --- /dev/null +++ b/classes/uefi-sign.bbclass @@ -0,0 +1,50 @@ +# By default, sign all .efi binaries in ${B} after compiling and before deploying +SIGNING_DIR ?= "${B}" +SIGNING_BINARIES ?= "*.efi" +SIGN_AFTER ?= "do_compile" +SIGN_BEFORE ?= "do_deploy" + +python () { + import os + import hashlib + + # Ensure that if the signing key or cert change, we rerun the uefiapp process + if bb.utils.contains('IMAGE_FEATURES', 'secureboot', True, False, d): + for varname in ('SECURE_BOOT_SIGNING_CERT', 'SECURE_BOOT_SIGNING_KEY'): + filename = d.getVar(varname) + if filename is None: + bb.fatal('%s is not set.' % varname) + if not os.path.isfile(filename): + bb.fatal('%s=%s is not a file.' % (varname, filename)) + with open(filename, 'rb') as f: + data = f.read() + hash = hashlib.sha256(data).hexdigest() + d.setVar('%s_HASH' % varname, hash) + + # Must reparse and thus rehash on file changes. + bb.parse.mark_dependency(d, filename) + + bb.build.addtask('uefi_sign', d.getVar('SIGN_BEFORE'), d.getVar('SIGN_AFTER'), d) + + # Original binary needs to be regenerated if the hash changes since we overwrite it + # SIGN_AFTER isn't necessarily when it gets generated, but its our best guess + d.appendVarFlag(d.getVar('SIGN_AFTER'), 'vardeps', 'SECURE_BOOT_SIGNING_CERT_HASH SECURE_BOOT_SIGNING_KEY_HASH') +} + +do_uefi_sign() { + if [ -f ${SECURE_BOOT_SIGNING_KEY} ] && [ -f ${SECURE_BOOT_SIGNING_CERT} ]; then + for i in `find ${SIGNING_DIR}/ -name '${SIGNING_BINARIES}'`; do + sbsign --key ${SECURE_BOOT_SIGNING_KEY} --cert ${SECURE_BOOT_SIGNING_CERT} $i + sbverify --cert ${SECURE_BOOT_SIGNING_CERT} $i.signed + mv $i.signed $i + done + fi +} + +do_uefi_sign[depends] += "sbsigntool-native:do_populate_sysroot" + +do_uefi_sign[vardeps] += "SECURE_BOOT_SIGNING_CERT_HASH \ + SECURE_BOOT_SIGNING_KEY_HASH \ + SIGNING_BINARIES SIGNING_DIR \ + SIGN_BEFORE SIGN_AFTER \ + " diff --git a/common/custom-licenses/BSD_LMS b/common/custom-licenses/BSD_LMS new file mode 100755 index 00000000..2ea28ff4 --- /dev/null +++ b/common/custom-licenses/BSD_LMS @@ -0,0 +1,30 @@ +Copyright (C) 2004-2012 Intel Corporation. All rights reserved. + +• This license covers the sources of the Local Manageability Service (LMS). +For licensing information for the LMS build scripts, please refer to the file build_script_license.txt. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + - Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + - Neither the name of Intel Corporation. nor the names of its + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/common/custom-licenses/Intel-Microcode-License b/common/custom-licenses/Intel-Microcode-License new file mode 100644 index 00000000..af5b41c2 --- /dev/null +++ b/common/custom-licenses/Intel-Microcode-License @@ -0,0 +1,123 @@ +INTEL SOFTWARE LICENSE AGREEMENT + +IMPORTANT - READ BEFORE COPYING, INSTALLING OR USING. +Do not use or load this software and any associated materials (collectively, +the "Software") until you have carefully read the following terms and +conditions. By loading or using the Software, you agree to the terms of this +Agreement. If you do not wish to so agree, do not install or use the Software. + +LICENSES: Please Note: +- If you are a network administrator, the "Site License" below shall +apply to you. +- If you are an end user, the "Single User License" shall apply to you. +- If you are an original equipment manufacturer (OEM), the "OEM License" +shall apply to you. + +SITE LICENSE. You may copy the Software onto your organization's computers +for your organization's use, and you may make a reasonable number of +back-up copies of the Software, subject to these conditions: + +1. This Software is licensed for use only in conjunction with Intel +component products. Use of the Software in conjunction with non-Intel +component products is not licensed hereunder. +2. You may not copy, modify, rent, sell, distribute or transfer any part +of the Software except as provided in this Agreement, and you agree to +prevent unauthorized copying of the Software. +3. You may not reverse engineer, decompile, or disassemble the Software. +4. You may not sublicense or permit simultaneous use of the Software by +more than one user. +5. The Software may include portions offered on terms in addition to those +set out here, as set out in a license accompanying those portions. + +SINGLE USER LICENSE. You may copy the Software onto a single computer for +your personal, noncommercial use, and you may make one back-up copy of the +Software, subject to these conditions: + +1. This Software is licensed for use only in conjunction with Intel +component products. Use of the Software in conjunction with non-Intel +component products is not licensed hereunder. +2. You may not copy, modify, rent, sell, distribute or transfer any part +of the Software except as provided in this Agreement, and you agree to +prevent unauthorized copying of the Software. +3. You may not reverse engineer, decompile, or disassemble the Software. +4. You may not sublicense or permit simultaneous use of the Software by +more than one user. +5. The Software may include portions offered on terms in addition to those +set out here, as set out in a license accompanying those portions. + +OEM LICENSE: You may reproduce and distribute the Software only as an +integral part of or incorporated in Your product or as a standalone +Software maintenance update for existing end users of Your products, +excluding any other standalone products, subject to these conditions: + +1. This Software is licensed for use only in conjunction with Intel +component products. Use of the Software in conjunction with non-Intel +component products is not licensed hereunder. +2. You may not copy, modify, rent, sell, distribute or transfer any part +of the Software except as provided in this Agreement, and you agree to +prevent unauthorized copying of the Software. +3. You may not reverse engineer, decompile, or disassemble the Software. +4. You may only distribute the Software to your customers pursuant to a +written license agreement. Such license agreement may be a "break-the- +seal" license agreement. At a minimum such license shall safeguard +Intel's ownership rights to the Software. +5. The Software may include portions offered on terms in addition to those +set out here, as set out in a license accompanying those portions. + +NO OTHER RIGHTS. No rights or licenses are granted by Intel to You, expressly +or by implication, with respect to any proprietary information or patent, +copyright, mask work, trademark, trade secret, or other intellectual property +right owned or controlled by Intel, except as expressly provided in this +Agreement. + +OWNERSHIP OF SOFTWARE AND COPYRIGHTS. Title to all copies of the Software +remains with Intel or its suppliers. The Software is copyrighted and +protected by the laws of the United States and other countries, and +international treaty provisions. You may not remove any copyright notices +from the Software. Intel may make changes to the Software, or to items +referenced therein, at any time without notice, but is not obligated to +support or update the Software. Except as otherwise expressly provided, Intel +grants no express or implied right under Intel patents, copyrights, +trademarks, or other intellectual property rights. You may transfer the +Software only if the recipient agrees to be fully bound by these terms and if +you retain no copies of the Software. + +LIMITED MEDIA WARRANTY. If the Software has been delivered by Intel on +physical media, Intel warrants the media to be free from material physical +defects for a period of ninety days after delivery by Intel. If such a defect +is found, return the media to Intel for replacement or alternate delivery of +the Software as Intel may select. + +EXCLUSION OF OTHER WARRANTIES. EXCEPT AS PROVIDED ABOVE, THE SOFTWARE IS +PROVIDED "AS IS" WITHOUT ANY EXPRESS OR IMPLIED WARRANTY OF ANY KIND +INCLUDING WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, OR FITNESS FOR A +PARTICULAR PURPOSE. Intel does not warrant or assume responsibility for the +accuracy or completeness of any information, text, graphics, links or other +items contained within the Software. + +LIMITATION OF LIABILITY. IN NO EVENT SHALL INTEL OR ITS SUPPLIERS BE LIABLE +FOR ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, LOST PROFITS, +BUSINESS INTERRUPTION, OR LOST INFORMATION) ARISING OUT OF THE USE OF OR +INABILITY TO USE THE SOFTWARE, EVEN IF INTEL HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. SOME JURISDICTIONS PROHIBIT EXCLUSION OR +LIMITATION OF LIABILITY FOR IMPLIED WARRANTIES OR CONSEQUENTIAL OR INCIDENTAL +DAMAGES, SO THE ABOVE LIMITATION MAY NOT APPLY TO YOU. YOU MAY ALSO HAVE +OTHER LEGAL RIGHTS THAT VARY FROM JURISDICTION TO JURISDICTION. + +TERMINATION OF THIS AGREEMENT. Intel may terminate this Agreement at any time +if you violate its terms. Upon termination, you will immediately destroy the +Software or return all copies of the Software to Intel. + +APPLICABLE LAWS. Claims arising under this Agreement shall be governed by the +laws of California, excluding its principles of conflict of laws and the +United Nations Convention on Contracts for the Sale of Goods. You may not +export the Software in violation of applicable export laws and regulations. +Intel is not obligated under any other agreements unless they are in writing +and signed by an authorized representative of Intel. + +GOVERNMENT RESTRICTED RIGHTS. The Software is provided with "RESTRICTED +RIGHTS." Use, duplication, or disclosure by the Government is subject to +restrictions as set forth in FAR52.227-14 and DFAR252.227-7013 et seq. or its +successor. Use of the Software by the Government constitutes acknowledgment +of Intel's proprietary rights therein. Contractor or Manufacturer is Intel +2200 Mission College Blvd., Santa Clara, CA 95052. diff --git a/common/recipes-bsp/amt/files/atnetworktool-printf-fix.patch b/common/recipes-bsp/amt/files/atnetworktool-printf-fix.patch new file mode 100644 index 00000000..6bb03e3a --- /dev/null +++ b/common/recipes-bsp/amt/files/atnetworktool-printf-fix.patch @@ -0,0 +1,20 @@ +Add a missing debug ifdef causing compilation problems. + +Upstream-Status: Submitted + +Signed-off-by: Tom Zanussi <tom.zanussi (a] intel.com> + +Index: lms-7.1.20/src/tools/ATNetworkTool.cpp +=================================================================== +--- lms-7.1.20.orig/src/tools/ATNetworkTool.cpp 2012-04-30 23:24:56.693879920 -0500 ++++ lms-7.1.20/src/tools/ATNetworkTool.cpp 2012-04-30 23:25:32.363473948 -0500 +@@ -302,7 +302,9 @@ + close(s); + return -1; + } ++#ifdef LMS_NET_DEBUG + printf("successfully binded local\n"); ++#endif + + } + if (bind(s, addr, addrlen) == -1) { diff --git a/common/recipes-bsp/amt/files/readlink-declaration.patch b/common/recipes-bsp/amt/files/readlink-declaration.patch new file mode 100644 index 00000000..0246d501 --- /dev/null +++ b/common/recipes-bsp/amt/files/readlink-declaration.patch @@ -0,0 +1,18 @@ +Add a missing include causing compilation (missing declaration) problems. + +Upstream-Status: Submitted + +Signed-off-by: Tom Zanussi <tom.zanussi (a] intel.com> + +Index: lms-7.1.20/src/tools/ATVersion.cpp +=================================================================== +--- lms-7.1.20.orig/src/tools/ATVersion.cpp 2012-05-29 20:34:34.061997035 -0500 ++++ lms-7.1.20/src/tools/ATVersion.cpp 2012-05-29 20:35:22.671412948 -0500 +@@ -40,6 +40,7 @@ + #include <cerrno> + #include <fstream> + #include <dirent.h> ++#include <unistd.h> + + #define AT_VERSION_ARGUMENT "--version" + #define AT_VERSION_MAXSIZE 40 diff --git a/common/recipes-bsp/amt/lms/0001-Include-sys-select.h-for-fd_set.patch b/common/recipes-bsp/amt/lms/0001-Include-sys-select.h-for-fd_set.patch new file mode 100644 index 00000000..e28d45ac --- /dev/null +++ b/common/recipes-bsp/amt/lms/0001-Include-sys-select.h-for-fd_set.patch @@ -0,0 +1,28 @@ +From 518a3a277c89a3d6b0a9d3ee552cfa33a1dbd5c6 Mon Sep 17 00:00:00 2001 +From: Jussi Kukkonen <jussi.kukkonen@intel.com> +Date: Mon, 23 Jan 2017 20:45:08 +0200 +Subject: [PATCH 1/2] Include sys/select.h for fd_set() + +This is needed at least on musl. + +Upstream-Status: Pending +Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> +--- + src/mei/MEILinux.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/mei/MEILinux.cpp b/src/mei/MEILinux.cpp +index 1e9d28f..631270e 100755 +--- a/src/mei/MEILinux.cpp ++++ b/src/mei/MEILinux.cpp +@@ -37,6 +37,7 @@ + #include <cerrno> + #include <fcntl.h> + #include <sys/ioctl.h> ++#include <sys/select.h> + #include <unistd.h> + #include <stdint.h> + #include <aio.h> +-- +2.1.4 + diff --git a/common/recipes-bsp/amt/lms/0001-Protocol.cpp-Add-whitespace-for-gcc6-compile-error.patch b/common/recipes-bsp/amt/lms/0001-Protocol.cpp-Add-whitespace-for-gcc6-compile-error.patch new file mode 100644 index 00000000..17b206e2 --- /dev/null +++ b/common/recipes-bsp/amt/lms/0001-Protocol.cpp-Add-whitespace-for-gcc6-compile-error.patch @@ -0,0 +1,31 @@ +From 8d737ba9745bef223c3d3b96899f11c26102ea04 Mon Sep 17 00:00:00 2001 +From: Saul Wold <sgw@linux.intel.com> +Date: Mon, 16 May 2016 09:01:05 -0700 +Subject: [PATCH] Protocol.cpp: Add whitespace for gcc6 compile error + +When moving from C++-3 -> C++11 additiona white space is required between +User-defined literals. + +Upstream-Status: Pending + +Signed-off-by: Saul Wold <sgw@linux.intel.com> +--- + src/Protocol.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Protocol.cpp b/src/Protocol.cpp +index 1c21a0f..3a4a9bb 100755 +--- a/src/Protocol.cpp ++++ b/src/Protocol.cpp +@@ -1428,7 +1428,7 @@ int Protocol::_handleFQDNChange(const char *fqdn) + char host[FQDN_MAX_SIZE + 1]; + #define LMS_MAX_LINE_LEN 1023 + char line[LMS_MAX_LINE_LEN + 1]; +-#define LMS_LINE_SIG_FIRST_WORDS(a) "# LMS GENERATED "a" " ++#define LMS_LINE_SIG_FIRST_WORDS(a) "# LMS GENERATED " a " " + #define LMS_LINE_SIG_LAST_WORD "LINE" + #define LMS_LINE_SIG_LAST_WORD_LEN 4 + #define LMS_LINE_SIG(a) LMS_LINE_SIG_FIRST_WORDS(a) LMS_LINE_SIG_LAST_WORD +-- +2.5.0 + diff --git a/common/recipes-bsp/amt/lms/0002-Use-proper-netinet-in.h-API.patch b/common/recipes-bsp/amt/lms/0002-Use-proper-netinet-in.h-API.patch new file mode 100644 index 00000000..fa2e29a5 --- /dev/null +++ b/common/recipes-bsp/amt/lms/0002-Use-proper-netinet-in.h-API.patch @@ -0,0 +1,31 @@ +From 0adc925ca9e005f93d77f373ccda2a6c6cc3ff2f Mon Sep 17 00:00:00 2001 +From: Jussi Kukkonen <jussi.kukkonen@intel.com> +Date: Mon, 23 Jan 2017 20:46:50 +0200 +Subject: [PATCH 2/2] Use proper netinet/in.h API + +in6addr is only guaranteed to contain this member: + uint8_t s6_addr[16] +Use that instead of the glibc implementation detail __in6_u. + +Upstream-Status: Pending +Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> +--- + src/tools/ATNetworkTool.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/tools/ATNetworkTool.cpp b/src/tools/ATNetworkTool.cpp +index 66e27df..0789c79 100755 +--- a/src/tools/ATNetworkTool.cpp ++++ b/src/tools/ATNetworkTool.cpp +@@ -207,7 +207,7 @@ int ATNetworkTool::GetSockPeerIP(int sock, ATAddressList & peerAddresses, int &e + if(sa->sa_family == AF_INET6 && IN6_IS_ADDR_V4MAPPED(&addr)) //if(IN6_IS_ADDR_V4COMPAT(&addr)) + { + struct in_addr demapped_addr; +- memcpy(&demapped_addr.s_addr, &addr.__in6_u.__u6_addr8[12], 4); ++ memcpy(&demapped_addr.s_addr, &addr.s6_addr[12], 4); + + struct sockaddr_in sa_in; + sa_in.sin_family = AF_INET; +-- +2.1.4 + diff --git a/common/recipes-bsp/amt/lms/0003-Fix-device-file-referance-to-dev-mei0-remove-select.patch b/common/recipes-bsp/amt/lms/0003-Fix-device-file-referance-to-dev-mei0-remove-select.patch new file mode 100644 index 00000000..433d3016 --- /dev/null +++ b/common/recipes-bsp/amt/lms/0003-Fix-device-file-referance-to-dev-mei0-remove-select.patch @@ -0,0 +1,91 @@ +Fix device file referance to /dev/mei0, remove select post write. + +LMS 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. + +Adding /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. + +Upstream-Status: Pending + +Signed-off-by: Anand Vastrad <anand.vastrad@intel.com> +--- + src/mei/MEILinux.cpp | 43 +++++++------------------------------------ + 1 file changed, 7 insertions(+), 36 deletions(-) + +diff --git a/src/mei/MEILinux.cpp b/src/mei/MEILinux.cpp +index 1e9d28f..6d23f54 100755 +--- a/src/mei/MEILinux.cpp ++++ b/src/mei/MEILinux.cpp +@@ -94,13 +94,17 @@ bool MEILinux::Init(unsigned char reqProtocolVersion) + Deinit(); + } + +- _fd = open("/dev/mei", O_RDWR); ++ _fd = open("/dev/mei0", O_RDWR); + + if (_fd == -1 ) { + if (_verbose) { +- fprintf(stderr, "Error: Cannot establish a handle to the MEI driver\n"); ++ fprintf(stderr, "Warning: Cannot establish a handle to the MEI driver mei0, retrying with mei \n"); ++ } ++ _fd = open("/dev/mei", O_RDWR); ++ if (_fd == -1 ) { ++ fprintf(stderr, "Error: Cannot establish a handle to the MEI driver mei\n"); ++ return false; + } +- return false; + } + _initialized = true; + +@@ -181,13 +185,7 @@ int MEILinux::ReceiveMessage(unsigned char *buffer, int len, unsigned long timeo + int MEILinux::SendMessage(const unsigned char *buffer, int len, unsigned long timeout) + { + int rv = 0; +- int return_length =0; + int error = 0; +- fd_set set; +- struct timeval tv; +- +- tv.tv_sec = timeout / 1000; +- tv.tv_usec =(timeout % 1000) * 1000000; + + if (_verbose) { + fprintf(stdout, "call write length = %d\n", len); +@@ -198,35 +196,8 @@ int MEILinux::SendMessage(const unsigned char *buffer, int len, unsigned long ti + if (_verbose) { + fprintf(stderr,"write failed with status %d %d\n", rv, error); + } +- goto out; +- } +- +- return_length = rv; +- +- FD_ZERO(&set); +- FD_SET(_fd, &set); +- rv = select(_fd+1 ,&set, NULL, NULL, &tv); +- if (rv > 0 && FD_ISSET(_fd, &set)) { +- if (_verbose) { +- fprintf(stderr, "write success\n"); +- } + } +- else if (rv == 0) { +- if (_verbose) { +- fprintf(stderr, "write failed on timeout with status\n"); +- } +- goto out; +- } +- else { //rv<0 +- if (_verbose) { +- fprintf(stderr, "write failed on select with status %d\n", rv); +- } +- goto out; +- } +- +- rv = return_length; + +-out: + if (rv < 0) { + Deinit(); + } +-- +2.7.4 + diff --git a/common/recipes-bsp/amt/lms/0004-Intel-AMT-ME-real-time-notification-infra.patch b/common/recipes-bsp/amt/lms/0004-Intel-AMT-ME-real-time-notification-infra.patch new file mode 100644 index 00000000..04f584ae --- /dev/null +++ b/common/recipes-bsp/amt/lms/0004-Intel-AMT-ME-real-time-notification-infra.patch @@ -0,0 +1,2647 @@ +Added Intel AMT ME real time notification infra to LMS. + +Notification support now actively captures all the INTEL AMT ME events by plugging in to APF infra. +These events message are in the WsMan XML format. WsMan XML is parsed to get the AlertID and Message arguments. +A map is initialized initially by reading AMTAlerts.xml which provides alertid,messageArguements and verbose description. +From AlertID, verbose description is obtained and then using d-bus infra verbose description is notified to the user. + +src/tools/utils.cpp Utils class provides static methods for string manipulation and desktop notification. +src/tools/miniXmlParser.cpp MiniXmlParser class provide methods for parsing the xmlBuffer, validation and retreving tag/value. +src/tools/httpParser.cpp HttpParser class provides method to parse http response buffer and populate header,body,headerfields properties. +src/alertDescription.cpp AlertDescription class parses AMTAlerts.xml like xml to populate map of alertId-Arguments and verbose desctiption. +src/alertIndication.cpp AlertIndication class provides binding to some xmlTags. It uses MiniXmlParse to parse xmlBuffer and provides access methods to some of the fields. +src/defaultAlerts.cpp provides default AlertID-Description paris. This is used in absence of AMTAlerts.xml. +src/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. +src/LMEConnection.cpp has modified the buffer 4x times because of the size of AMT ME Xml data. +src/Protocol.cpp [ _UNSHandler(char *data, int dataLength) ] has changes to recieve AMT ME event data, gracefully process the data and close the channel. + +src/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. + +Upstream-Status: Pending + +Signed-off-by: AnandVastrad <anand.vastrad@intel.com> +--- + Makefile.in | 2 + + src/AMTAlerts.xml | 464 ++++++++++++++++++++++++++++++++++++++++++++ + src/LMEConnection.cpp | 2 +- + src/Makefile.am | 3 + + src/Makefile.in | 172 ++++++++++++++-- + src/Makefile.inc | 20 +- + src/Protocol.cpp | 191 +++++++++++++++--- + src/Protocol.h | 8 +- + src/alertDescription.cpp | 144 ++++++++++++++ + src/alertDescription.h | 45 +++++ + src/alertIndication.cpp | 90 +++++++++ + src/alertIndication.h | 54 ++++++ + src/defaultAlerts.h | 43 ++++ + src/notifyDesktop.sh | 10 + + src/tools/httpParser.cpp | 101 ++++++++++ + src/tools/httpParser.h | 49 +++++ + src/tools/miniXmlParser.cpp | 375 +++++++++++++++++++++++++++++++++++ + src/tools/miniXmlParser.h | 51 +++++ + src/tools/utils.cpp | 185 ++++++++++++++++++ + src/tools/utils.h | 57 ++++++ + src/tools/xmlNode.cpp | 45 +++++ + src/tools/xmlNode.h | 49 +++++ + 22 files changed, 2105 insertions(+), 55 deletions(-) + mode change 100755 => 100644 Makefile.in + create mode 100755 src/AMTAlerts.xml + mode change 100755 => 100644 src/Makefile.in + create mode 100644 src/alertDescription.cpp + create mode 100644 src/alertDescription.h + create mode 100644 src/alertIndication.cpp + create mode 100644 src/alertIndication.h + create mode 100644 src/defaultAlerts.h + create mode 100644 src/notifyDesktop.sh + create mode 100644 src/tools/httpParser.cpp + create mode 100644 src/tools/httpParser.h + create mode 100644 src/tools/miniXmlParser.cpp + create mode 100644 src/tools/miniXmlParser.h + create mode 100644 src/tools/utils.cpp + create mode 100644 src/tools/utils.h + create mode 100644 src/tools/xmlNode.cpp + create mode 100644 src/tools/xmlNode.h + +diff --git a/Makefile.in b/Makefile.in +old mode 100755 +new mode 100644 +index f90be60..e1a248b +--- a/Makefile.in ++++ b/Makefile.in +@@ -133,6 +133,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + RANLIB = @RANLIB@ +@@ -185,6 +186,7 @@ pdfdir = @pdfdir@ + prefix = @prefix@ + program_transform_name = @program_transform_name@ + psdir = @psdir@ ++runstatedir = @runstatedir@ + sbindir = @sbindir@ + sharedstatedir = @sharedstatedir@ + sysconfdir = @sysconfdir@ +diff --git a/src/AMTAlerts.xml b/src/AMTAlerts.xml +new file mode 100755 +index 0000000..ddb3383 +--- /dev/null ++++ b/src/AMTAlerts.xml +@@ -0,0 +1,464 @@ ++<?xml version="1.0" encoding="utf-8" standalone="no"?> ++<!-- Copyright (c) Intel Corporation, 2010 All Rights Reserved. --> ++<Alerts> ++<Alert> ++<Id>iAMT0001</Id> ++<Arg></Arg> ++<Message>System Defense Policy triggered.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0002</Id> ++<Arg></Arg> ++<Message>Agent Presence Agent not started.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0003</Id> ++<Arg></Arg> ++<Message>Agent Presence Agent stopped.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0004</Id> ++<Arg></Arg> ++<Message>Agent Presence: running.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0005</Id> ++<Arg></Arg> ++<Message>Agent Presence: expired.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0006</Id> ++<Arg></Arg> ++<Message>Agent Presence: suspended.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0007</Id> ++<Arg></Arg> ++<Message>Host software attempt to disable AMT Network link detected.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0008</Id> ++<Arg></Arg> ++<Message>Host software attempt to disable AMT Network link detected -- Host Network link blocked.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0009</Id> ++<Arg></Arg> ++<Message>AMT clock or FLASH wear-out protection disabled.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0010</Id> ++<Arg></Arg> ++<Message>Intel(R) AMT Network Interface: Heuristics defense slow threshold trespassed.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0011</Id> ++<Arg></Arg> ++<Message>Intel(R) AMT Network Interface: Heuristics defense fast threshold trespassed.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0012</Id> ++<Arg></Arg> ++<Message>Intel(R) AMT Network Interface: Heuristics defense factory defined threshold trespassed.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0013</Id> ++<Arg></Arg> ++<Message>Intel(R) AMT Network Interface: Heuristics defense Encounter timeout expired.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0014</Id> ++<Arg></Arg> ++<Message>General certificate error.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0015</Id> ++<Arg></Arg> ++<Message>Certificate expired.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0016</Id> ++<Arg></Arg> ++<Message>No trusted root certificate.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0017</Id> ++<Arg></Arg> ++<Message>Not configured to work with server certificate.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0018</Id> ++<Arg></Arg> ++<Message>Certificate revoked.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0019</Id> ++<Arg></Arg> ++<Message>RSA exponent too large.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0020</Id> ++<Arg></Arg> ++<Message>RSA modulus too large.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0021</Id> ++<Arg></Arg> ++<Message>Unsupported digest.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0022</Id> ++<Arg></Arg> ++<Message>Distinguished name too long.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0023</Id> ++<Arg></Arg> ++<Message>Key usage missing.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0024</Id> ++<Arg></Arg> ++<Message>General SSL handshake error.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0025</Id> ++<Arg></Arg> ++<Message>General 802.1x error.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0026</Id> ++<Arg></Arg> ++<Message>AMT Diagnostic AlertEAC error - General NAC error.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0027</Id> ++<Arg></Arg> ++<Message>AMT Diagnostic AlertEAC error - attempt to get a NAC posture while AMT NAC is disabled.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0028</Id> ++<Arg></Arg> ++<Message>AMT Diagnostic AlertEAC error - attempt to get a posture of an unsupported type.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0029</Id> ++<Arg></Arg> ++<Message>Audit log storage is 50% full.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0030</Id> ++<Arg></Arg> ++<Message>Audit log storage is 75% full.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0031</Id> ++<Arg></Arg> ++<Message>Audit log storage is 85% full.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0032</Id> ++<Arg></Arg> ++<Message>Audit log storage is 95% full.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0033</Id> ++<Arg></Arg> ++<Message>Audit log storage is full.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0034</Id> ++<Arg></Arg> ++<Message>Firmware Update Event - Partial.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0035</Id> ++<Arg></Arg> ++<Message>Firmware Update Event - Failure.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0036</Id> ++<Arg></Arg> ++<Message>Remote connectivity initiated.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0037</Id> ++<Arg></Arg> ++<Message>ME Presence event.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0038</Id> ++<Arg>0</Arg> ++<Message>AMT is being unprovisioned using BIOS command.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0038</Id> ++<Arg>1</Arg> ++<Message>AMT is being unprovisioned using Local MEI command.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0038</Id> ++<Arg>2</Arg> ++<Message>AMT is being unprovisioned using Local WS-MAN/SOAP command.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0038</Id> ++<Arg>3</Arg> ++<Message>AMT is being unprovisioned using Remote WS-MAN/SOAP command.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0050</Id> ++<Arg></Arg> ++<Message>User Notification Alert - General Notification.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0050</Id> ++<Arg>16</Arg> ++<Message>User Notification Alert - Circuit Breaker notification (CB Drop TX filter hit.).</Message> ++</Alert> ++<Alert> ++<Id>iAMT0050</Id> ++<Arg>17</Arg> ++<Message>User Notification Alert - Circuit Breaker notification (CB Rate Limit TX filter hit.).</Message> ++</Alert> ++<Alert> ++<Id>iAMT0050</Id> ++<Arg>18</Arg> ++<Message>User Notification Alert - Circuit Breaker notification (CB Drop RX filter hit.).</Message> ++</Alert> ++<Alert> ++<Id>iAMT0050</Id> ++<Arg>19</Arg> ++<Message>User Notification Alert - Circuit Breaker notification (CB Rate Limit RX filter hit.).</Message> ++</Alert> ++<Alert> ++<Id>iAMT0050</Id> ++<Arg>32</Arg> ++<Message>User Notification Alert - EAC notification.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0050</Id> ++<Arg>48</Arg> ++<Message>User Notification Alert - Remote diagnostics - (Remote Redirection session started - SOL).</Message> ++</Alert> ++<Alert> ++<Id>iAMT0050</Id> ++<Arg>49</Arg> ++<Message>User Notification Alert - Remote diagnostics - (Remote Redirection session stopped - SOL).</Message> ++</Alert> ++<Alert> ++<Id>iAMT0050</Id> ++<Arg>50</Arg> ++<Message>User Notification Alert - Remote diagnostics. (Remote Redirection session started - IDE-R).</Message> ++</Alert> ++<Alert> ++<Id>iAMT0050</Id> ++<Arg>51</Arg> ++<Message>User Notification Alert - Remote diagnostics. (Remote Redirection session stopped - IDE-R).</Message> ++</Alert> ++<Alert> ++<Id>iAMT0050</Id> ++<Arg>66</Arg> ++<Message>User Notification Alert - WLAN notification (Host profile mismatch - Management Interface ignored).</Message> ++</Alert> ++<Alert> ++<Id>iAMT0050</Id> ++<Arg>67</Arg> ++<Message>User Notification Alert - WLAN notification (Management device overrides host radio).</Message> ++</Alert> ++<Alert> ++<Id>iAMT0050</Id> ++<Arg>68</Arg> ++<Message>User Notification Alert - WLAN notification (Host profile security mismatch).</Message> ++</Alert> ++<Alert> ++<Id>iAMT0050</Id> ++<Arg>69</Arg> ++<Message>User Notification Alert - WLAN notification (Management device relinquishes control over host Radio).</Message> ++</Alert> ++<Alert> ++<Id>iAMT0051</Id> ++<Arg></Arg> ++<Message>User Notification Alert - SecIo event.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0051</Id> ++<Arg>0</Arg> ++<Message>User Notification Alert - SecIo event semaphore at host.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0051</Id> ++<Arg>1</Arg> ++<Message>User Notification Alert - semaphore at ME.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0051</Id> ++<Arg>2</Arg> ++<Message>User Notification Alert - SecIo event - semaphore timeout.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0052</Id> ++<Arg></Arg> ++<Message>User Notification Alert - KVM session event.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0052</Id> ++<Arg>0</Arg> ++<Message>User Notification Alert - KVM session requested.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0052</Id> ++<Arg>1</Arg> ++<Message>User Notification Alert - KVM session started.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0052</Id> ++<Arg>2</Arg> ++<Message>User Notification Alert - KVM session stopped.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0053</Id> ++<Arg></Arg> ++<Message>User Notification Alert - RCS notification.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0053</Id> ++<Arg>50</Arg> ++<Message>User Notification Alert - RCS notification (HW button pressed. Connection initiated automatically).</Message> ++</Alert> ++<Alert> ++<Id>iAMT0053</Id> ++<Arg>52</Arg> ++<Message>User Notification Alert - RCS notification (HW button pressed. Connection wasn't initiated automatically).</Message> ++</Alert> ++<Alert> ++<Id>iAMT0053</Id> ++<Arg>53</Arg> ++<Message>User Notification Alert - RCS notification (Contracts updated).</Message> ++</Alert> ++<Alert> ++<Id>iAMT0054</Id> ++<Arg></Arg> ++<Message>User Notification Alert - WLAN notification. Wireless Profile sync enablement state changed.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0055</Id> ++<Arg></Arg> ++<Message>User Notification Alert - Provisioning state change notification.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0055</Id> ++<Arg>0</Arg> ++<Message>User Notification Alert - Provisioning state change notification - Pre-configuration.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0055</Id> ++<Arg>1</Arg> ++<Message>User Notification Alert - Provisioning state change notification - In configuration.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0055</Id> ++<Arg>2</Arg> ++<Message>User Notification Alert - Provisioning state change notification - Post-configuration.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0055</Id> ++<Arg>3</Arg> ++<Message>User Notification Alert - Provisioning state change notification - unprovision process has started.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0056</Id> ++<Arg></Arg> ++<Message>User Notification Alert - System Defense change notification.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0057</Id> ++<Arg></Arg> ++<Message>User Notification Alert - Network State change notification.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0058</Id> ++<Arg></Arg> ++<Message>User Notification Alert - Remote Access change notification.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0058</Id> ++<Arg>1</Arg> ++<Message>User Notification Alert - Remote Access change notification - tunnel is closed.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0058</Id> ++<Arg>1</Arg> ++<Message>User Notification Alert - Remote Access change notification - tunnel is open.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0059</Id> ++<Arg></Arg> ++<Message>User Notification Alert - KVM enabled event.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0059</Id> ++<Arg>0</Arg> ++<Message>User Notification Alert - KVM enabled event - KVM disabled.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0059</Id> ++<Arg>1</Arg> ++<Message>User Notification Alert - KVM enabled event - KVM enabled (both from MEBx and PTNI).</Message> ++</Alert> ++<Alert> ++<Id>iAMT0060</Id> ++<Arg></Arg> ++<Message>User Notification Alert - SecIO configuration event.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0061</Id> ++<Arg></Arg> ++<Message>ME FW reset occurred.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0062</Id> ++<Arg></Arg> ++<Message>User Notification Alert - IpSyncEnabled event.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0062</Id> ++<Arg>0</Arg> ++<Message>User Notification Alert - IpSyncEnabled event - IpSync disabled.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0062</Id> ++<Arg>1</Arg> ++<Message>User Notification Alert - IpSyncEnabled event - IpSync enabled.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0063</Id> ++<Arg></Arg> ++<Message>User Notification Alert - HTTP Proxy sync enabled event.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0063</Id> ++<Arg>0</Arg> ++<Message>User Notification Alert - HTTP Proxy sync enabled event - HTTP Proxy Sync disabled.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0063</Id> ++<Arg>1</Arg> ++<Message>User Notification Alert - HTTP Proxy sync enabled event - HTTP Proxy Sync enabled.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0064</Id> ++<Arg></Arg> ++<Message>User Notification Alert - User Consent event.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0064</Id> ++<Arg>1</Arg> ++<Message>User Notification Alert - User Consent event - User Consent granted.</Message> ++</Alert> ++<Alert> ++<Id>iAMT0064</Id> ++<Arg>2</Arg> ++<Message>User Notification Alert - User Consent event - User Consent ended.</Message> ++</Alert> ++</Alerts> +diff --git a/src/LMEConnection.cpp b/src/LMEConnection.cpp +index f3e7a2b..d192626 100755 +--- a/src/LMEConnection.cpp ++++ b/src/LMEConnection.cpp +@@ -48,7 +48,7 @@ extern glue plugin; + + const GUID LMEConnection::_guid = {0x6733a4db, 0x0476, 0x4e7b, {0xb3, 0xaf, 0xbc, 0xfc, 0x29, 0xbe, 0xe7, 0xa7}}; + +-const UINT32 LMEConnection::RX_WINDOW_SIZE = 1024; ++const UINT32 LMEConnection::RX_WINDOW_SIZE = 4096; + + LMEConnection::LMEConnection(bool verbose) : + _reqID(0), +diff --git a/src/Makefile.am b/src/Makefile.am +index 42d9f47..364427b 100755 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -1,4 +1,7 @@ + sbin_PROGRAMS=lms ++dist_bin_SCRIPTS=notifyDesktop.sh ++xml_dir=$(datadir)/xml ++xml__DATA=AMTAlerts.xml + + SYNCLIB_SRCDIR=SyncLib/src + SYNCLIB_HDRDIR=SyncLib/Include +diff --git a/src/Makefile.in b/src/Makefile.in +old mode 100755 +new mode 100644 +index c6fe1ba..7b6cafd +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -14,6 +14,8 @@ + + @SET_MAKE@ + ++ ++ + srcdir = @srcdir@ + top_srcdir = @top_srcdir@ + VPATH = @srcdir@ +@@ -37,9 +39,9 @@ POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ + sbin_PROGRAMS = lms$(EXEEXT) +-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ +- $(srcdir)/Makefile.inc $(srcdir)/iatshareddata.h.in \ +- $(srcdir)/plugin.h.in ++DIST_COMMON = $(dist_bin_SCRIPTS) $(srcdir)/Makefile.am \ ++ $(srcdir)/Makefile.in $(srcdir)/Makefile.inc \ ++ $(srcdir)/iatshareddata.h.in $(srcdir)/plugin.h.in + subdir = src + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/configure.ac +@@ -48,14 +50,17 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + mkinstalldirs = $(install_sh) -d + CONFIG_HEADER = $(top_builddir)/config.h + CONFIG_CLEAN_FILES = plugin.h iatshareddata.h +-am__installdirs = "$(DESTDIR)$(sbindir)" ++am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(bindir)" \ ++ "$(DESTDIR)$(xml_dir)" + sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) + PROGRAMS = $(sbin_PROGRAMS) + am__objects_1 = main.$(OBJEXT) LMEConnection.$(OBJEXT) \ + ConfigConnection.$(OBJEXT) Protocol.$(OBJEXT) glue.$(OBJEXT) \ +- ChannelGenerator.$(OBJEXT) ++ ChannelGenerator.$(OBJEXT) alertIndication.$(OBJEXT) \ ++ alertDescription.$(OBJEXT) + am__objects_2 = ATVersion.$(OBJEXT) ATNetworkTool.$(OBJEXT) \ +- daemonize.$(OBJEXT) ++ daemonize.$(OBJEXT) utils.$(OBJEXT) miniXmlParser.$(OBJEXT) \ ++ xmlNode.$(OBJEXT) httpParser.$(OBJEXT) + am__objects_3 = MEILinux.$(OBJEXT) MNGCommand.$(OBJEXT) \ + FWULCommand.$(OBJEXT) PTHICommand.$(OBJEXT) + am__objects_4 = EventLinux.$(OBJEXT) SemaphoreLinux.$(OBJEXT) \ +@@ -68,6 +73,8 @@ am__objects_7 = $(am__objects_6) $(am__objects_6) $(am__objects_6) \ + am_lms_OBJECTS = $(am__objects_5) $(am__objects_7) + lms_OBJECTS = $(am_lms_OBJECTS) + lms_LDADD = $(LDADD) ++dist_binSCRIPT_INSTALL = $(INSTALL_SCRIPT) ++SCRIPTS = $(dist_bin_SCRIPTS) + DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) + depcomp = $(SHELL) $(top_srcdir)/depcomp + am__depfiles_maybe = depfiles +@@ -89,6 +96,14 @@ LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ + SOURCES = $(lms_SOURCES) + DIST_SOURCES = $(lms_SOURCES) ++am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; ++am__vpath_adj = case $$p in \ ++ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ ++ *) f=$$p;; \ ++ esac; ++am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; ++xml_DATA_INSTALL = $(INSTALL_DATA) ++DATA = $(xml__DATA) + ETAGS = etags + CTAGS = ctags + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +@@ -150,6 +165,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ + PACKAGE_NAME = @PACKAGE_NAME@ + PACKAGE_STRING = @PACKAGE_STRING@ + PACKAGE_TARNAME = @PACKAGE_TARNAME@ ++PACKAGE_URL = @PACKAGE_URL@ + PACKAGE_VERSION = @PACKAGE_VERSION@ + PATH_SEPARATOR = @PATH_SEPARATOR@ + RANLIB = @RANLIB@ +@@ -202,10 +218,14 @@ pdfdir = @pdfdir@ + prefix = @prefix@ + program_transform_name = @program_transform_name@ + psdir = @psdir@ ++runstatedir = @runstatedir@ + sbindir = @sbindir@ + sharedstatedir = @sharedstatedir@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ ++dist_bin_SCRIPTS = notifyDesktop.sh ++xml_dir = $(datadir)/xml ++xml__DATA = AMTAlerts.xml + SYNCLIB_SRCDIR = SyncLib/src + SYNCLIB_HDRDIR = SyncLib/Include + MEI_DIR = mei +@@ -238,11 +258,19 @@ $(MEI_DIR)/PTHICommand.cpp + + TOOLS_HDRS = $(TOOLS_DIR)/ATVersion.h \ + $(TOOLS_DIR)/ATNetworkTool.h \ +-$(TOOLS_DIR)/daemonize.h ++$(TOOLS_DIR)/daemonize.h \ ++$(TOOLS_DIR)/utils.h \ ++$(TOOLS_DIR)/miniXmlParser.h \ ++$(TOOLS_DIR)/xmlNode.h \ ++$(TOOLS_DIR)/httpParser.h + + TOOLS_SRCS = $(TOOLS_DIR)/ATVersion.cpp \ + $(TOOLS_DIR)/ATNetworkTool.cpp \ +-$(TOOLS_DIR)/daemonize.cpp ++$(TOOLS_DIR)/daemonize.cpp \ ++$(TOOLS_DIR)/utils.cpp \ ++$(TOOLS_DIR)/miniXmlParser.cpp \ ++$(TOOLS_DIR)/xmlNode.cpp \ ++$(TOOLS_DIR)/httpParser.cpp + + MAIN_HDRS = types.h \ + Channel.h \ +@@ -254,14 +282,18 @@ ConfigConnection.h \ + Protocol.h \ + glue.h \ + version.h \ +-ChannelGenerator.h ++ChannelGenerator.h \ ++alertIndication.h \ ++alertDescription.h + + MAIN_SRCS = main.cpp \ + LMEConnection.cpp \ + ConfigConnection.cpp \ + Protocol.cpp \ + glue.cpp \ +-ChannelGenerator.cpp ++ChannelGenerator.cpp \ ++alertIndication.cpp \ ++alertDescription.cpp + + SRCS = $(MAIN_SRCS) \ + $(TOOLS_SRCS) \ +@@ -342,6 +374,25 @@ clean-sbinPROGRAMS: + lms$(EXEEXT): $(lms_OBJECTS) $(lms_DEPENDENCIES) + @rm -f lms$(EXEEXT) + $(CXXLINK) $(lms_LDFLAGS) $(lms_OBJECTS) $(lms_LDADD) $(LIBS) ++install-dist_binSCRIPTS: $(dist_bin_SCRIPTS) ++ @$(NORMAL_INSTALL) ++ test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" ++ @list='$(dist_bin_SCRIPTS)'; for p in $$list; do \ ++ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ ++ if test -f $$d$$p; then \ ++ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ ++ echo " $(dist_binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ ++ $(dist_binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ ++ else :; fi; \ ++ done ++ ++uninstall-dist_binSCRIPTS: ++ @$(NORMAL_UNINSTALL) ++ @list='$(dist_bin_SCRIPTS)'; for p in $$list; do \ ++ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ ++ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ ++ rm -f "$(DESTDIR)$(bindir)/$$f"; \ ++ done + + mostlyclean-compile: + -rm -f *.$(OBJEXT) +@@ -355,17 +406,23 @@ distclean-compile: + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ConfigConnection.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EventLinux.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FWULCommand.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MEILinux.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LMEConnection.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MEILinux.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MNGCommand.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PTHICommand.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Protocol.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RWLock.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SemaphoreLinux.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ThreadLinux.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alertDescription.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alertIndication.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/daemonize.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glue.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/httpParser.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miniXmlParser.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmlNode.Po@am__quote@ + + .cpp.o: + @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@@ -430,6 +487,62 @@ daemonize.obj: $(TOOLS_DIR)/daemonize.cpp + @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @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` + ++utils.o: $(TOOLS_DIR)/utils.cpp ++@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; \ ++@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/utils.Tpo" "$(DEPDIR)/utils.Po"; else rm -f "$(DEPDIR)/utils.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(TOOLS_DIR)/utils.cpp' object='utils.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@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 ++ ++utils.obj: $(TOOLS_DIR)/utils.cpp ++@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`; \ ++@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/utils.Tpo" "$(DEPDIR)/utils.Po"; else rm -f "$(DEPDIR)/utils.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(TOOLS_DIR)/utils.cpp' object='utils.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@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` ++ ++miniXmlParser.o: $(TOOLS_DIR)/miniXmlParser.cpp ++@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; \ ++@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/miniXmlParser.Tpo" "$(DEPDIR)/miniXmlParser.Po"; else rm -f "$(DEPDIR)/miniXmlParser.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(TOOLS_DIR)/miniXmlParser.cpp' object='miniXmlParser.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@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 ++ ++miniXmlParser.obj: $(TOOLS_DIR)/miniXmlParser.cpp ++@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`; \ ++@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/miniXmlParser.Tpo" "$(DEPDIR)/miniXmlParser.Po"; else rm -f "$(DEPDIR)/miniXmlParser.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(TOOLS_DIR)/miniXmlParser.cpp' object='miniXmlParser.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@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` ++ ++xmlNode.o: $(TOOLS_DIR)/xmlNode.cpp ++@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; \ ++@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/xmlNode.Tpo" "$(DEPDIR)/xmlNode.Po"; else rm -f "$(DEPDIR)/xmlNode.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(TOOLS_DIR)/xmlNode.cpp' object='xmlNode.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@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 ++ ++xmlNode.obj: $(TOOLS_DIR)/xmlNode.cpp ++@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`; \ ++@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/xmlNode.Tpo" "$(DEPDIR)/xmlNode.Po"; else rm -f "$(DEPDIR)/xmlNode.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(TOOLS_DIR)/xmlNode.cpp' object='xmlNode.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@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` ++ ++httpParser.o: $(TOOLS_DIR)/httpParser.cpp ++@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; \ ++@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/httpParser.Tpo" "$(DEPDIR)/httpParser.Po"; else rm -f "$(DEPDIR)/httpParser.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(TOOLS_DIR)/httpParser.cpp' object='httpParser.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@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 ++ ++httpParser.obj: $(TOOLS_DIR)/httpParser.cpp ++@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`; \ ++@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/httpParser.Tpo" "$(DEPDIR)/httpParser.Po"; else rm -f "$(DEPDIR)/httpParser.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(TOOLS_DIR)/httpParser.cpp' object='httpParser.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@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` ++ + MEILinux.o: $(MEI_DIR)/MEILinux.cpp + @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; \ + @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/MEILinux.Tpo" "$(DEPDIR)/MEILinux.Po"; else rm -f "$(DEPDIR)/MEILinux.Tpo"; exit 1; fi +@@ -551,6 +664,23 @@ clean-libtool: + distclean-libtool: + -rm -f libtool + uninstall-info-am: ++install-xml_DATA: $(xml__DATA) ++ @$(NORMAL_INSTALL) ++ test -z "$(xml_dir)" || $(mkdir_p) "$(DESTDIR)$(xml_dir)" ++ @list='$(xml__DATA)'; for p in $$list; do \ ++ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ ++ f=$(am__strip_dir) \ ++ echo " $(xml_DATA_INSTALL) '$$d$$p' '$(DESTDIR)$(xml_dir)/$$f'"; \ ++ $(xml_DATA_INSTALL) "$$d$$p" "$(DESTDIR)$(xml_dir)/$$f"; \ ++ done ++ ++uninstall-xml_DATA: ++ @$(NORMAL_UNINSTALL) ++ @list='$(xml__DATA)'; for p in $$list; do \ ++ f=$(am__strip_dir) \ ++ echo " rm -f '$(DESTDIR)$(xml_dir)/$$f'"; \ ++ rm -f "$(DESTDIR)$(xml_dir)/$$f"; \ ++ done + + ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ +@@ -629,9 +759,9 @@ distdir: $(DISTFILES) + done + check-am: all-am + check: check-am +-all-am: Makefile $(PROGRAMS) ++all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA) + installdirs: +- for dir in "$(DESTDIR)$(sbindir)"; do \ ++ for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(xml_dir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done + install: install-am +@@ -679,11 +809,11 @@ info: info-am + + info-am: + +-install-data-am: ++install-data-am: install-xml_DATA + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-data-hook + +-install-exec-am: install-sbinPROGRAMS ++install-exec-am: install-dist_binSCRIPTS install-sbinPROGRAMS + + install-info: install-info-am + +@@ -709,20 +839,22 @@ ps: ps-am + + ps-am: + +-uninstall-am: uninstall-info-am uninstall-sbinPROGRAMS ++uninstall-am: uninstall-dist_binSCRIPTS uninstall-info-am \ ++ uninstall-sbinPROGRAMS uninstall-xml_DATA + + .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-sbinPROGRAMS ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ +- install-data-hook install-exec install-exec-am install-info \ +- install-info-am install-man install-sbinPROGRAMS install-strip \ ++ install-data-hook install-dist_binSCRIPTS install-exec \ ++ install-exec-am install-info install-info-am install-man \ ++ install-sbinPROGRAMS install-strip install-xml_DATA \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ +- tags uninstall uninstall-am uninstall-info-am \ +- uninstall-sbinPROGRAMS ++ tags uninstall uninstall-am uninstall-dist_binSCRIPTS \ ++ uninstall-info-am uninstall-sbinPROGRAMS uninstall-xml_DATA + + + install-data-hook: +diff --git a/src/Makefile.inc b/src/Makefile.inc +index 079503c..8d7e7ab 100755 +--- a/src/Makefile.inc ++++ b/src/Makefile.inc +@@ -26,11 +26,19 @@ $(MEI_DIR)/PTHICommand.cpp + + TOOLS_HDRS=$(TOOLS_DIR)/ATVersion.h \ + $(TOOLS_DIR)/ATNetworkTool.h \ +-$(TOOLS_DIR)/daemonize.h ++$(TOOLS_DIR)/daemonize.h \ ++$(TOOLS_DIR)/utils.h \ ++$(TOOLS_DIR)/miniXmlParser.h \ ++$(TOOLS_DIR)/xmlNode.h \ ++$(TOOLS_DIR)/httpParser.h + + TOOLS_SRCS=$(TOOLS_DIR)/ATVersion.cpp \ + $(TOOLS_DIR)/ATNetworkTool.cpp \ +-$(TOOLS_DIR)/daemonize.cpp ++$(TOOLS_DIR)/daemonize.cpp \ ++$(TOOLS_DIR)/utils.cpp \ ++$(TOOLS_DIR)/miniXmlParser.cpp \ ++$(TOOLS_DIR)/xmlNode.cpp \ ++$(TOOLS_DIR)/httpParser.cpp + + MAIN_HDRS=types.h \ + Channel.h \ +@@ -42,14 +50,18 @@ ConfigConnection.h \ + Protocol.h \ + glue.h \ + version.h \ +-ChannelGenerator.h ++ChannelGenerator.h \ ++alertIndication.h \ ++alertDescription.h + + MAIN_SRCS=main.cpp \ + LMEConnection.cpp \ + ConfigConnection.cpp \ + Protocol.cpp \ + glue.cpp \ +-ChannelGenerator.cpp ++ChannelGenerator.cpp \ ++alertIndication.cpp \ ++alertDescription.cpp + + SRCS=$(MAIN_SRCS) \ + $(TOOLS_SRCS) \ +diff --git a/src/Protocol.cpp b/src/Protocol.cpp +index 3a4a9bb..c3de5cc 100755 +--- a/src/Protocol.cpp ++++ b/src/Protocol.cpp +@@ -28,6 +28,7 @@ + * POSSIBILITY OF SUCH DAMAGE. + *******************************************************************************/ + ++ + #ifdef HAVE_CONFIG_H + #include "config.h" + #endif +@@ -42,7 +43,8 @@ + #include <fcntl.h> + #include <netdb.h> + #include <syslog.h> +-#include "strings.h" ++#include <vector> ++#include <string.h> + + #define _stprintf_s snprintf + #define strnicmp strncasecmp +@@ -53,6 +55,11 @@ + #include "LMS_if.h" + #include "Lock.h" + #include "ATNetworkTool.h" ++#include "utils.h" ++#include "httpParser.h" ++#include "miniXmlParser.h" ++#include "alertIndication.h" ++#include "alertDescription.h" + + + const LMEProtocolVersionMessage Protocol::MIN_PROT_VERSION(1, 0); +@@ -99,9 +106,9 @@ bool Protocol::Init(EventLogCallback cb, void *param) + PRINT("Protocol::Init started\n"); + _eventLog = cb; + _eventLogParam = param; ++ _UNSSenderChannel = INVALID_CHANNEL; + + DeinitFull(); +- + { + Lock dl(_deinitLock); + _deinitReq = false; +@@ -1170,10 +1177,112 @@ void Protocol::_removeFromMaps(Channel *c) + _channelToSocket.erase(c->GetSenderChannel()); + _socketToChannel.erase(s); + } +-void Protocol::_UNSConnection() ++ ++std::string Protocol::_PACKET_BODY_LENGTH="Content-Length"; ++std::string Protocol::_NOTIFICATION_HEADER="Intel Management Engine Notification"; ++int Protocol::_UNSHandler(char *data, int dataLength) + { +- PRINT("UNS event\n"); ++ PRINT("UNS event data\n"); ++ char *pBuffer = NULL; ++ static char *sBuffer = NULL; ++ static int sBufferLength = 0; ++ int rc = -1; ++ unsigned int packetBodyLength = 0; ++ HttpParser httpParser; ++ std::string httpBody; ++ AlertIndication alertIndication; ++ ++ //printf("Processing notification message %d\n", newNotification); ++ ++ //Init if new notification. Append recieved notification bytes to existing buffer otherwise. ++ if (_newNotification == true) ++ { if (sBuffer != NULL) { ++ delete []sBuffer; ++ } ++ sBuffer = NULL; ++ sBufferLength = 0; ++ } ++ ++ if (sBuffer == NULL) { ++ sBufferLength = 0; ++ sBuffer = new char[(dataLength+1) *sizeof(char)]; ++ memcpy(sBuffer, data, dataLength); ++ } else { ++ pBuffer = new char[(sBufferLength + dataLength + 1)*sizeof(char)]; ++ memcpy(pBuffer, sBuffer, sBufferLength); ++ memcpy(pBuffer+sBufferLength, data, dataLength); ++ delete []sBuffer; ++ sBuffer = pBuffer; ++ } ++ ++ sBufferLength += dataLength; ++ sBuffer[sBufferLength] = '\0'; ++ ++ do { ++ ++ if (httpParser.parse(sBuffer) != 0) { ++ break; ++ } ++ ++ if (httpParser.getHeaderField(_PACKET_BODY_LENGTH).empty()) { ++ break; ++ } ++ ++ packetBodyLength = stoi(httpParser.getHeaderField(_PACKET_BODY_LENGTH)); ++ ++ if (packetBodyLength == 0) { ++ break; ++ } ++ ++ httpBody = httpParser.getBody(); ++ if (httpBody.size() < packetBodyLength) { ++ break; ++ } ++ ++ if (alertIndication.initFromXml((char*)httpBody.c_str(), httpBody.size())) { ++ break; ++ } ++ ++ std::string alertIDString(alertIndication.getMessageID().data, alertIndication.getMessageID().dataLength); ++ if (alertIDString.empty()) { ++ break; ++ } ++ ++ /*Check if we have match only with ID, if fails then use MessageArguments and checkagain */ ++ std::string alertDescription; ++ std::string _alertDescription; ++ std::string notificationBody; ++ std::string messageArguments; ++ alertDescription = AlertDescription::getAlertDescription(alertIDString); ++ messageArguments = std::string(alertIndication.getMessageArguments().data, alertIndication.getMessageArguments().dataLength); ++ ++ if (alertDescription.empty()) { ++ alertIDString += "-" + messageArguments; ++ alertDescription = AlertDescription::getAlertDescription(alertIDString); ++ } else { ++ _alertDescription = messageArguments; ++ } ++ ++ notificationBody = std::string(alertIndication.getIndicationTime().data, alertIndication.getIndicationTime().dataLength); ++ if (alertDescription.empty()) { ++ notificationBody += " " + alertIDString; ++ } else { ++ if (_alertDescription.empty()) { ++ notificationBody += " " + alertDescription; ++ } else { ++ notificationBody += " : " + _alertDescription + " : " + alertDescription; ++ } ++ } ++ ++ Utils::notifyDesktop(_NOTIFICATION_HEADER, notificationBody, true); ++ rc = 0; ++ ++ } while(0); ++ ++ return rc; ++ + } ++ + int Protocol::_sendHostFQDN() + { + char localName[FQDN_MAX_SIZE] = "\0"; +@@ -1195,12 +1304,15 @@ void Protocol::_apfChannelOpen(LMEChannelOpenRequestMessage *chOpenMsg, int *sta + " Recipient channel %d for address %s, port %d.\n", + chOpenMsg->SenderChannel, + chOpenMsg->Address.c_str(), chOpenMsg->Port); ++ + if(chOpenMsg->Port==0) + { +- _UNSConnection(); +- _sendHostFQDN(); +- return; ++ _UNSSenderChannel = chOpenMsg->SenderChannel; ++ _lme.ChannelOpenReplySuccess(_UNSSenderChannel, _UNSRecipientChannel); ++ _newNotification = true; ++ return; + } ++ + SOCKET s = ATNetworkTool::Connect(chOpenMsg->Address.c_str(), + chOpenMsg->Port, error, PF_UNSPEC); + if (s == INVALID_SOCKET) { +@@ -1282,33 +1394,41 @@ PortForwardRequest *Protocol::_apfChannelClose(LMEChannelCloseMessage *chClMsg) + Lock l(_channelsLock); + PRINT("_apfChannelClose: RecipientChannel=%d\n",chClMsg->RecipientChannel); + +- +- ChannelToSocketMap::iterator it = _channelToSocket.find(chClMsg->RecipientChannel); +- if (it != _channelToSocket .end()) +- { +- SOCKET s = it->second; +- Channel *c = _socketToChannel[s]; +- switch(c->GetStatus()) { +- case Channel::OPEN: +- c->SetStatus(Channel::CLOSED); +- +- _lme.ChannelClose(c->GetRecipientChannel(), c->GetSenderChannel()); +- PRINT("Channel %d was closed by Intel AMT.\n", c->GetSenderChannel()); ++ do { ++ if (chClMsg->RecipientChannel == _UNSRecipientChannel) ++ { ++ //UNS event channel close. ++ //We have not created a channel on LMS side, hence ignore + break; ++ } + +- case Channel::WAITING_CLOSE: +- PRINT("Received reply by Intel AMT on closing channel %d.\n", c->GetSenderChannel()); +- break; ++ ChannelToSocketMap::iterator it = _channelToSocket.find(chClMsg->RecipientChannel); ++ if (it != _channelToSocket .end()) ++ { ++ SOCKET s = it->second; ++ Channel *c = _socketToChannel[s]; ++ switch(c->GetStatus()) { ++ case Channel::OPEN: ++ c->SetStatus(Channel::CLOSED); ++ ++ _lme.ChannelClose(c->GetRecipientChannel(), c->GetSenderChannel()); ++ PRINT("Channel %d was closed by Intel AMT.\n", c->GetSenderChannel()); ++ break; + +- case Channel::CLOSED: +- case Channel::NOT_OPENED: +- break; +- } ++ case Channel::WAITING_CLOSE: ++ PRINT("Received reply by Intel AMT on closing channel %d.\n", c->GetSenderChannel()); ++ break; + +- _removeFromMaps(c); +- clPFwdReq = _closeMChannel(c); ++ case Channel::CLOSED: ++ case Channel::NOT_OPENED: ++ break; ++ } ++ ++ _removeFromMaps(c); ++ clPFwdReq = _closeMChannel(c); + +- } ++ } ++ } while(0); + + _channelGenerator.FreeChannel(chClMsg->RecipientChannel); + +@@ -1320,6 +1440,18 @@ PortForwardRequest *Protocol::_apfChannelData(LMEChannelDataMessage *chDMsg, int + PortForwardRequest *clPFwdReq = NULL; + + do { ++ if (chDMsg->RecipientChannel == _UNSRecipientChannel) ++ ++ { ++ if (_UNSHandler((char*)chDMsg->Data, chDMsg->DataLength) == 0) ++ { ++ _lme.ChannelClose(_UNSSenderChannel, _UNSRecipientChannel); ++ } ++ _newNotification = false; ++ //UNS event data handle. ++ //We have not created a channel on LMS side, hence break ++ break; ++ } + Lock l(_channelsLock); + + ChannelToSocketMap::iterator it = _channelToSocket.find(chDMsg->RecipientChannel); +@@ -1341,6 +1473,7 @@ PortForwardRequest *Protocol::_apfChannelData(LMEChannelDataMessage *chDMsg, int + int senderr = 0; + int count = _send(channel->GetSocket(), (char *)chDMsg->Data, + chDMsg->DataLength, senderr); ++ + PRINT("Sent %d bytes of %d from Intel AMT to channel %d with socket %d.\n", + count, chDMsg->DataLength, chDMsg->RecipientChannel, + channel->GetSocket()); +diff --git a/src/Protocol.h b/src/Protocol.h +index a4ef419..858cb78 100755 +--- a/src/Protocol.h ++++ b/src/Protocol.h +@@ -46,6 +46,7 @@ + + #define SOCKET int + #define INVALID_SOCKET (SOCKET)(~0) ++#define INVALID_CHANNEL -1 + #define SOCKET_ERROR (-1) + + +@@ -120,7 +121,7 @@ private: + PortForwardRequest *_apfChannelData(LMEChannelDataMessage *chDMsg, int *status); + void _LmeReceive(void *buffer, unsigned int len, int *status); + void _signalSelect(); +- void _UNSConnection(); ++ int _UNSHandler(char *buffer, int len); + bool _acceptConnection(SOCKET s, unsigned int port); + int _rxFromSocket(SOCKET s); + int _handleFQDNChange(const char *fqdn); +@@ -192,6 +193,11 @@ private: + typedef std::set<unsigned int> listenPortSet; + listenPortSet _listenFailReported; + ChannelGenerator _channelGenerator; ++ static const unsigned int _UNSRecipientChannel = 55555; ++ unsigned int _UNSSenderChannel; ++ bool _newNotification; ++ static std::string _PACKET_BODY_LENGTH; ++ static std::string _NOTIFICATION_HEADER; + }; + + #endif +diff --git a/src/alertDescription.cpp b/src/alertDescription.cpp +new file mode 100644 +index 0000000..f05f940 +--- /dev/null ++++ b/src/alertDescription.cpp +@@ -0,0 +1,144 @@ ++/******************************************************************************* ++ * Copyright (C) 2017 Intel Corporation. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * ++ * - Neither the name of Intel Corporation. nor the names of its ++ * contributors may be used to endorse or promote products derived from this ++ * software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS ++ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ *******************************************************************************/ ++#include "alertDescription.h" ++#include "miniXmlParser.h" ++#include <sstream> ++#include <fstream> ++#include "defaultAlerts.h" ++#include "types.h" ++ ++bool AlertDescription::classInited = false; ++std::string AlertDescription::alertXmlFile = "/usr/local/share/xml/AMTAlerts.xml"; ++std::string AlertDescription::alertXmlFile1 = "/usr/share/xml/AMTAlerts.xml"; ++std::map<std::string,std::string> AlertDescription::alertDescriptionMap; ++ ++void AlertDescription::initAlertDescription() { ++ ++ char *value = NULL; ++ unsigned int valueLength = 0; ++ bool fromFile = false; ++ std::string alertIdArg; ++ std::stringstream ss; ++ std::string xmlData; ++ CDataLen id; ++ CDataLen arg; ++ CDataLen description; ++ MiniXmlParser xmlParser; ++ std::list<CDataLen>defaultAlertsList; ++ std::list<CDataLen>::iterator it; ++ ++ do { ++ if (classInited) { ++ break; ++ } ++ ++ std::ifstream is(alertXmlFile, std::ifstream::in); ++ if (is.good()) { ++ ss << is.rdbuf(); ++ xmlData = ss.str(); ++ fromFile = true; ++ } else { ++ std::ifstream _is(alertXmlFile1, std::ifstream::in); ++ if (_is.good()) { ++ ss << _is.rdbuf(); ++ xmlData = ss.str(); ++ fromFile = true; ++ } ++ _is.close(); ++ } ++ is.close(); ++ ++ /* Parse alert descriptions from xml file, if file is absent use the default ones */ ++ if (fromFile) { ++ /* From xml file */ ++ if (xmlParser.parse((char*)xmlData.c_str(), xmlData.size()) == 0) { ++ /* Process alert xml of form ++ * <Alerts><Alert><Id>iAMT0052</Id><Arg>1</Arg></Alert> <Alert>...</Alert> ...<Alerts> ++ */ ++ if (xmlParser.getXmlTagValue(xmlParser.getRootNode(), "Alerts", 6, NULL, 0, &value, &valueLength) == 0 ) { ++ while (xmlParser.getXmlTagValue(NULL, "Alert", 5, NULL, 0, &value, &valueLength) == 0) { ++ xmlParser.getXmlTagValue(NULL, "Id", 2, NULL, 0, &value, &valueLength); ++ id.data = value; ++ id.dataLength = valueLength; ++ ++ xmlParser.getXmlTagValue(NULL, "Arg", 3, NULL, 0, &value, &valueLength); ++ arg.data = value; ++ arg.dataLength = valueLength; ++ ++ alertIdArg = std::string(id.data, id.dataLength) + "-" + std::string(arg.data, arg.dataLength); ++ ++ xmlParser.getXmlTagValue(NULL, "Message", 7, NULL, 0, &value, &valueLength); ++ alertDescriptionMap.insert(std::pair<std::string, std::string>(alertIdArg, std::string(value, valueLength))); ++ } ++ classInited = true; ++ } ++ } else { ++ PRINT("Failed to parse XML\n"); ++ } ++ } else { ++ /* Using default XML alerts descriptions */ ++ defaultAlertsList = Utils::split(DEFAULT_ALERTS , DEFAULT_ALERTS_LENGTH , ";", 1); ++ for (CDataLen alert: defaultAlertsList) { ++ std::list<CDataLen> alertIdDescription = Utils::split(alert.data, alert.dataLength, ":", 1); ++ if (alertIdDescription.size() >= 2) { ++ it = alertIdDescription.begin(); ++ id.data = it->data; ++ id.dataLength = it->dataLength; ++ it++; ++ description.data = it->data; ++ description.dataLength = it->dataLength; ++ /* Add to std::map for faster retreival */ ++ alertDescriptionMap.insert(std::pair<std::string, std::string>(std::string(id.data, id.dataLength), ++ std::string(description.data, description.dataLength))); ++ } ++ } ++ classInited = true; ++ } ++ } while(0); ++} ++ ++ ++std::string AlertDescription::getAlertDescription(std::string alert) { ++ CDataLen alertDescription; ++ std::map<std::string, std::string>::iterator it; ++ ++ if (classInited == false) { ++ initAlertDescription(); ++ } ++ ++ if (classInited && alertDescriptionMap.empty() == false) { ++ it = alertDescriptionMap.find(alert); ++ if (it != alertDescriptionMap.end()) { ++ return it->second; ++ } ++ } ++ ++ return ""; ++}; +diff --git a/src/alertDescription.h b/src/alertDescription.h +new file mode 100644 +index 0000000..6413f2a +--- /dev/null ++++ b/src/alertDescription.h +@@ -0,0 +1,45 @@ ++/******************************************************************************* ++ * Copyright (C) 2017 Intel Corporation. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * ++ * - Neither the name of Intel Corporation. nor the names of its ++ * contributors may be used to endorse or promote products derived from this ++ * software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS ++ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ *******************************************************************************/ ++#ifndef _ALERTDESCRIPTION_H ++#define _AlERTDESCRIPTION_H ++#include "utils.h" ++#include <string> ++#include <map> ++class AlertDescription { ++ protected: ++ static bool classInited; ++ static std::string alertXmlFile; ++ static std::string alertXmlFile1; ++ static void initAlertDescription(); ++ static std::map<std::string, std::string> alertDescriptionMap; ++ public: ++ static std::string getAlertDescription(std::string alert); ++}; ++#endif +diff --git a/src/alertIndication.cpp b/src/alertIndication.cpp +new file mode 100644 +index 0000000..ed14abd +--- /dev/null ++++ b/src/alertIndication.cpp +@@ -0,0 +1,90 @@ ++/******************************************************************************* ++ * Copyright (C) 2017 Intel Corporation. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * ++ * - Neither the name of Intel Corporation. nor the names of its ++ * contributors may be used to endorse or promote products derived from this ++ * software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS ++ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ *******************************************************************************/ ++#include "miniXmlParser.h" ++#include "alertIndication.h" ++#include <string.h> ++ ++const char* AlertIndication::CLASS_URI = "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_AlertIndication"; ++void AlertIndication::initAlertIndication(char *ns, unsigned int nsLen) { ++ ++ char *value = NULL; ++ unsigned int valueLen= 0; ++ ++ if (xmlParser.getXmlTagValue(xmlParser.getRootNode(), "MessageID", strlen("MessageID"), ns, nsLen, &value, &valueLen) == 0) { ++ messageID.data = value; ++ messageID.dataLength = valueLen; ++ } ++ ++ if (xmlParser.getXmlTagValue(xmlParser.getRootNode(), "MessageArguments", strlen("MessageArguments"), ns, nsLen, &value, &valueLen) == 0) { ++ messageArguments.data = value; ++ messageArguments.dataLength = valueLen; ++ } ++ ++ if (xmlParser.getXmlTagValue(xmlParser.getRootNode(), "IndicationTime", strlen("IndicationTime"), ns, nsLen, &value, &valueLen) == 0) { ++ if (xmlParser.getXmlTagValue(NULL, "Datetime", strlen("Datetime"), NULL, 0, &value, &valueLen) == 0) { ++ indicationTime.data = value; ++ indicationTime.dataLength = valueLen; ++ } ++ } ++} ++ ++int AlertIndication::initFromXml(char *buffer, unsigned int bufferLen) { ++ ++ char *nsPrefix = NULL; ++ int rc = 0; ++ unsigned int nsPrefixLen = 0; ++ ++ do { ++ if (buffer == NULL || bufferLen == 0) { ++ rc = -1; ++ break; ++ } ++ ++ if (xmlParser.parse(buffer, bufferLen)) { ++ rc = -1; ++ break; ++ } ++ ++ if (xmlParser.getNSPrefix(xmlParser.getRootNode(), (char*)CLASS_URI, CLASS_URI_LEN, &nsPrefix, &nsPrefixLen)) { ++ rc = -1; ++ break; ++ } ++ ++ initAlertIndication(nsPrefix, nsPrefixLen); ++ ++ } while(0); ++ ++ return rc; ++} ++ ++CDataLen AlertIndication::getMessageArguments() { return messageArguments; }; ++CDataLen AlertIndication::getIndicationTime() { return indicationTime; }; ++CDataLen AlertIndication::getMessageID() { return messageID; }; ++ +diff --git a/src/alertIndication.h b/src/alertIndication.h +new file mode 100644 +index 0000000..cf6dc51 +--- /dev/null ++++ b/src/alertIndication.h +@@ -0,0 +1,54 @@ ++/******************************************************************************* ++ * Copyright (C) 2017 Intel Corporation. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * ++ * - Neither the name of Intel Corporation. nor the names of its ++ * contributors may be used to endorse or promote products derived from this ++ * software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS ++ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ *******************************************************************************/ ++#ifndef __ALERTINDICATION_H ++#define __ALERTINDICATION_H ++ ++#include "utils.h" ++#include <map> ++ ++class AlertIndication { ++ private: ++ MiniXmlParser xmlParser; ++ CDataLen messageArguments; ++ CDataLen indicationTime; ++ CDataLen messageID; ++ void initAlertIndication(char *ns, unsigned int nsLen); ++ ++ public: ++ static const char* CLASS_URI; ++ static const int CLASS_URI_LEN = 69; ++ int initFromXml(char *buffer, unsigned int bufferLen); ++ CDataLen getMessageArguments(); ++ CDataLen getMessageID(); ++ CDataLen getIndicationTime(); ++ ++}; ++ ++#endif +diff --git a/src/defaultAlerts.h b/src/defaultAlerts.h +new file mode 100644 +index 0000000..23283f8 +--- /dev/null ++++ b/src/defaultAlerts.h +@@ -0,0 +1,43 @@ ++#ifndef _DEFAULTALERTS_H ++#define _DEFAULTALERTS_H ++#define DEFAULT_ALERTS_LENGTH 6257 ++#define DEFAULT_ALERTS "iAMT0001-:System Defense Policy triggered.;iAMT0002-:Agent Presence Agent not started.;iAMT0003-:Agent Presence Agent stopped.;iAMT0004-:Agent Presence: running.;\ ++iAMT0005-:Agent Presence: expired.;iAMT0006-:Agent Presence: suspended.;iAMT0007-:Host software attempt to disable AMT Network link detected.;\ ++iAMT0008-:Host software attempt to disable AMT Network link detected -- Host Network link blocked.;iAMT0009-:AMT clock or FLASH wear-out protection disabled.;\ ++iAMT0010-:Intel(R) AMT Network Interface: Heuristics defense slow threshold trespassed.;iAMT0011-:Intel(R) AMT Network Interface: Heuristics defense fast threshold trespassed.;\ ++iAMT0012-:Intel(R) AMT Network Interface: Heuristics defense factory defined threshold trespassed.;iAMT0013-:Intel(R) AMT Network Interface: Heuristics defense Encounter timeout expired.;\ ++iAMT0014-:General certificate error.;iAMT0015-:Certificate expired.;iAMT0016-:No trusted root certificate.;iAMT0017-:Not configured to work with server certificate.;iAMT0018-:Certificate revoked.;\ ++iAMT0019-:RSA exponent too large.;iAMT0020-:RSA modulus too large.;iAMT0021-:Unsupported digest.;iAMT0022-:Distinguished name too long.;iAMT0023-:Key usage missing.;\ ++iAMT0024-:General SSL handshake error.;iAMT0025-:General 802.1x error.;iAMT0026-:AMT Diagnostic AlertEAC error - General NAC error.;\ ++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.;\ ++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.;\ ++iAMT0033-:Audit log storage is full.;iAMT0034-:Firmware Update Event - Partial.;iAMT0035-:Firmware Update Event - Failure.;iAMT0036-:Remote connectivity initiated.;\ ++iAMT0037-:ME Presence event.;iAMT0038-0:AMT is being unprovisioned using BIOS command.;iAMT0038-1:AMT is being unprovisioned using Local MEI command.;\ ++iAMT0038-2:AMT is being unprovisioned using Local WS-MAN/SOAP command.;iAMT0038-3:AMT is being unprovisioned using Remote WS-MAN/SOAP command.;\ ++iAMT0050-:User Notification Alert - General Notification.;iAMT0050-16:User Notification Alert - Circuit Breaker notification (CB Drop TX filter hit.).;\ ++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.).;\ ++iAMT0050-19:User Notification Alert - Circuit Breaker notification (CB Rate Limit RX filter hit.).;iAMT0050-32:User Notification Alert - EAC notification.;\ ++iAMT0050-48:User Notification Alert - Remote diagnostics - (Remote Redirection session started - SOL).;iAMT0050-49:User Notification Alert - Remote diagnostics - (Remote Redirection session stopped - SOL).;\ ++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).;\ ++iAMT0050-66:User Notification Alert - WLAN notification (Host profile mismatch - Management Interface ignored).;\ ++iAMT0050-67:User Notification Alert - WLAN notification (Management device overrides host radio).;iAMT0050-68:User Notification Alert - WLAN notification (Host profile security mismatch).;\ ++iAMT0050-69:User Notification Alert - WLAN notification (Management device relinquishes control over host Radio).;iAMT0051-:User Notification Alert - SecIo event.;\ ++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.;\ ++iAMT0052-:User Notification Alert - KVM session event.;iAMT0052-0:User Notification Alert - KVM session requested.;iAMT0052-1:User Notification Alert - KVM session started.;\ ++iAMT0052-2:User Notification Alert - KVM session stopped.;iAMT0053-:User Notification Alert - RCS notification.;\ ++iAMT0053-50:User Notification Alert - RCS notification (HW button pressed. Connection initiated automatically).;\ ++iAMT0053-52:User Notification Alert - RCS notification (HW button pressed. Connection wasn't initiated automatically).;iAMT0053-53:User Notification Alert - RCS notification (Contracts updated).;\ ++iAMT0054-:User Notification Alert - WLAN notification. Wireless Profile sync enablement state changed.;iAMT0055-:User Notification Alert - Provisioning state change notification.;\ ++iAMT0055-0:User Notification Alert - Provisioning state change notification - Pre-configuration.;iAMT0055-1:User Notification Alert - Provisioning state change notification - In configuration.;\ ++iAMT0055-2:User Notification Alert - Provisioning state change notification - Post-configuration.;\ ++iAMT0055-3:User Notification Alert - Provisioning state change notification - unprovision process has started.;iAMT0056-:User Notification Alert - System Defense change notification.;\ ++iAMT0057-:User Notification Alert - Network State change notification.;iAMT0058-:User Notification Alert - Remote Access change notification.;\ ++iAMT0058-1:User Notification Alert - Remote Access change notification - tunnel is closed.;iAMT0058-1:User Notification Alert - Remote Access change notification - tunnel is open.;\ ++iAMT0059-:User Notification Alert - KVM enabled event.;iAMT0059-0:User Notification Alert - KVM enabled event - KVM disabled.;\ ++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.;\ ++iAMT0062-:User Notification Alert - IpSyncEnabled event.;iAMT0062-0:User Notification Alert - IpSyncEnabled event - IpSync disabled.;\ ++iAMT0062-1:User Notification Alert - IpSyncEnabled event - IpSync enabled.;iAMT0063-:User Notification Alert - HTTP Proxy sync enabled event.;\ ++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.;\ ++iAMT0064-:User Notification Alert - User Consent event.;iAMT0064-1:User Notification Alert - User Consent event - User Consent granted.;\ ++iAMT0064-2:User Notification Alert - User Consent event - User Consent ended.;" ++#endif +diff --git a/src/notifyDesktop.sh b/src/notifyDesktop.sh +new file mode 100644 +index 0000000..06bfd97 +--- /dev/null ++++ b/src/notifyDesktop.sh +@@ -0,0 +1,10 @@ ++#!/bin/sh ++# get list of current users ++for x in $(who | sort -u -k1,1 | awk '{print $1}'); do ++ # send message to anyone on display 0 ++ dbus_session_file=$(eval echo "~$x")/.dbus/session-bus/$(cat /var/lib/dbus/machine-id)-0 ++ if [ -e "$dbus_session_file" ]; then ++ su -l "$x" -c "source '$dbus_session_file'; export DISPLAY=:0; notify-send -u critical -t 2000 '$1' '$2'" ++ fi ++done ++ +diff --git a/src/tools/httpParser.cpp b/src/tools/httpParser.cpp +new file mode 100644 +index 0000000..38d2901 +--- /dev/null ++++ b/src/tools/httpParser.cpp +@@ -0,0 +1,101 @@ ++/******************************************************************************* ++ * Copyright (C) 2017 Intel Corporation. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * ++ * - Neither the name of Intel Corporation. nor the names of its ++ * contributors may be used to endorse or promote products derived from this ++ * software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS ++ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ *******************************************************************************/ ++#include "httpParser.h" ++#include "utils.h" ++#include "types.h" ++ ++int HttpParser::parse(char *buffer) { ++ ++ std::vector<std::string> headerBody; ++ std::vector<std::string> header; ++ int rc = 0; ++ do { ++ if (buffer == NULL) { ++ rc = -1; ++ break; ++ } ++ ++ headerBody = Utils::split(buffer, "\r\n\r\n"); ++ if (headerBody.size() < 2) ++ { ++ PRINT("Failed to process httpHeader\n"); ++ rc = -1; ++ break; ++ } ++ ++ /* Entries in Header are seperated by \r\n */ ++ header = Utils::split((char*)headerBody[0].c_str(), "\r\n"); ++ ++ /* First line in header is the the header line ++ * e.g. POST <path> HTTP/1.1 ++ * e.g GET <path> HTTP/1.1 ++ */ ++ headerLine = header[0]; ++ ++ /* After headerline are the Fields ++ * e.g Content-Length:2204 ++ */ ++ for (unsigned int i=1; i< header.size(); i++) { ++ std::vector<std::string> field = Utils::split((char*)header[i].c_str(), ":"); ++ if (field.size() < 2) { ++ rc = -1; ++ break; ++ } ++ headerFields.insert(std::pair<std::string, std::string>(field[0], field[1])); ++ } ++ ++ if (rc) break; ++ ++ body = headerBody[1]; ++ } while(0); ++ ++ return rc; ++} ++ ++std::string HttpParser::getHeaderLine() { ++ return headerLine; ++} ++ ++std::string HttpParser::getHeaderField(std::string field) { ++ std::map<std::string,std::string>::iterator it; ++ std::string fieldValue = ""; ++ ++ it = headerFields.find(field); ++ if (it != headerFields.end()) ++ { ++ fieldValue = it->second; ++ } ++ ++ return fieldValue; ++} ++ ++std::string HttpParser::getBody() { ++ return body; ++} +diff --git a/src/tools/httpParser.h b/src/tools/httpParser.h +new file mode 100644 +index 0000000..a82d82a +--- /dev/null ++++ b/src/tools/httpParser.h +@@ -0,0 +1,49 @@ ++/******************************************************************************* ++ * Copyright (C) 2017 Intel Corporation. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * ++ * - Neither the name of Intel Corporation. nor the names of its ++ * contributors may be used to endorse or promote products derived from this ++ * software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS ++ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ *******************************************************************************/ ++#ifndef _HTTPPARSER_H ++#define _HTTPPARSER_H ++#include <vector> ++#include <map> ++#include <string> ++ ++class HttpParser { ++ ++ public: ++ int parse(char *buffer); ++ std::string getHeaderLine(); ++ std::string getHeaderField(std::string field); ++ std::string getBody(); ++ private: ++ std::string headerLine; ++ std::map<std::string, std::string> headerFields; ++ std::string body; ++ ++}; ++#endif +diff --git a/src/tools/miniXmlParser.cpp b/src/tools/miniXmlParser.cpp +new file mode 100644 +index 0000000..f1f0503 +--- /dev/null ++++ b/src/tools/miniXmlParser.cpp +@@ -0,0 +1,375 @@ ++/******************************************************************************* ++ * Copyright (C) 2017 Intel Corporation. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * ++ * - Neither the name of Intel Corporation. nor the names of its ++ * contributors may be used to endorse or promote products derived from this ++ * software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS ++ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ *******************************************************************************/ ++#include "miniXmlParser.h" ++#include "utils.h" ++#include <string.h> ++#include <list> ++#include <stack> ++#include "types.h" ++ ++MiniXmlParser::MiniXmlParser() { ++ rootNode = NULL; ++} ++ ++MiniXmlParser::~MiniXmlParser() { ++ if (rootNode) { ++ deleteXmlTree(rootNode); ++ rootNode = NULL; ++ } ++} ++ ++void MiniXmlParser::deleteXmlTree(XMLNode* rootNode) { ++ XMLNode* node = rootNode; ++ XMLNode* tempNode = NULL; ++ ++ while (node != NULL) { ++ tempNode = node->childNode; ++ delete node; ++ node = tempNode; ++ } ++} ++ ++int MiniXmlParser::validateXML(XMLNode const* rootNode) { ++ int rc = 0; ++ XMLNode* current = (XMLNode *)rootNode; ++ XMLNode* temp = NULL; ++ std::stack<XMLNode*> tagStack; ++ ++ while (current != NULL) { ++ if (current->tagName == NULL) { ++ PRINT("ValidateXML failed, foung a empty tag\n"); ++ rc = -1; ++ break; ++ } ++ ++ if (memcmp(current->tagName, "!", 1) == 0) { ++ temp = current; ++ current = tagStack.empty()?NULL:tagStack.top(); ++ if (current != NULL) { ++ current->childNode = temp->childNode; ++ } else { ++ current = temp; ++ } ++ } else if (current->startTag) { ++ current->parentNode = tagStack.empty()?NULL:tagStack.top(); ++ tagStack.push(current); ++ } else { ++ if (tagStack.empty() == false) { ++ temp = tagStack.top(); ++ tagStack.pop(); ++ } else { ++ temp = NULL; ++ } ++ if (temp != NULL) { ++ if (temp->tagLength == current->tagLength && memcmp(temp->tagName, current->tagName, current->tagLength) == 0) { ++ if (current->childNode != NULL) { ++ if (current->childNode->startTag != 0) { ++ temp->siblingNode = current->childNode; ++ } ++ } ++ temp->closingTag = current; ++ current->startingTag = temp; ++ } else { ++ PRINT("ValidateXML failed, Illegal tag\n"); ++ rc = -1; ++ break; ++ } ++ } else { ++ PRINT("ValidateXML failed, Illegal closing tag\n"); ++ rc = -1; ++ break; ++ } ++ } ++ current = current->childNode; ++ } ++ ++ if (tagStack.empty() == false) { ++ PRINT("ValidateXML failed, Incomplete XML\n"); ++ rc = -1; ++ } ++ ++ return rc; ++} ++ ++int MiniXmlParser::parse(char* buffer, unsigned int bufferLength) { ++ int validXml = -1; ++ XMLNode* node = NULL; ++ ++ node = _parse(buffer, bufferLength); ++ if (node) { ++ validXml = validateXML(node); ++ } ++ rootNode = node; ++ return validXml; ++} ++ ++XMLNode* MiniXmlParser::_parse(char const* buffer, unsigned int bufferLength) { ++ ++ char* tagName = NULL; ++ char* nsTag = NULL; ++ char* CommentEnd = NULL; ++ ++ int tagLength = 0; ++ int startTag = 0; ++ int emptyTag = 0; ++ int nsLength = 0; ++ int i = 0; ++ int CommentIndex = 0; ++ ++ std::list<CDataLen> xmlFields; ++ std::list<CDataLen> temp2; ++ std::list<CDataLen> tagValue; ++ ++ XMLNode *rootNode = NULL;; ++ XMLNode *current = NULL; ++ XMLNode *newNode = NULL; ++ std::list<CDataLen>::iterator it; ++ ++ if (buffer == NULL || bufferLength == 0) { ++ return NULL; ++ } ++ ++ xmlFields = Utils::split(buffer, bufferLength, "<", 1); ++ for (CDataLen xmlField: xmlFields) { ++ if (xmlField.dataLength != 0 && memcmp(xmlField.data, "?", 1) != 0 && (xmlField.data > CommentEnd)) { ++ /*Parse XML comments and ignore it.*/ ++ if (xmlField.dataLength > 3 && memcmp(xmlField.data, "!--", 3)==0) { ++ CommentIndex = 3; ++ while (((xmlField.data + CommentIndex) < (buffer + bufferLength)) && memcmp(xmlField.data + CommentIndex, "-->", 3) != 0) { ++ CommentIndex++; ++ } ++ CommentEnd = xmlField.data + CommentIndex; ++ continue; ++ } else { ++ emptyTag = 0; ++ /*if the first char is / after < then its ending tag, otherwise starting tag. ("</....") */ ++ if (memcmp(xmlField.data, "/", 1) == 0) { ++ startTag = 0; ++ xmlField.data = xmlField.data + 1; ++ xmlField.dataLength -= 1; ++ temp2 = Utils::split(xmlField.data, xmlField.dataLength, ">", 1); ++ } else { ++ ++ startTag = 1; ++ temp2 = Utils::split(xmlField.data, xmlField.dataLength, ">", 1); ++ if (temp2.front().dataLength > 0 && *(char*)(temp2.front().data-1) == '/') { ++ //".../>" are empty tags ++ emptyTag = 1; ++ } ++ } ++ } ++ /*split on ":" to get namespace:tagName*/ ++ tagValue = Utils::split(temp2.front().data, temp2.front().dataLength, ":", 1); ++ if (tagValue.size() == 1) { ++ nsTag = NULL; ++ nsLength = 0; ++ tagName = tagValue.front().data; ++ tagLength = tagValue.front().dataLength; ++ } else { ++ it = tagValue.begin(); ++ nsTag = it->data; ++ nsLength = it->dataLength; ++ it++; ++ tagName = it->data; ++ tagLength = it->dataLength; ++ } ++ tagValue.clear(); ++ temp2.clear(); ++ ++ /*Parse for multiple ns:tags and recompute the first tagLength*/ ++ for(i=0; i<tagLength; i++) { ++ if ((tagName[i] == ' ')||(tagName[i] == '/')||(tagName[i] == '>')||(tagName[i] == '\t')||(tagName[i] == '\r')||(tagName[i] == '\n')) { ++ if (i != 0) { ++ if (tagName[i]=='/') { ++ emptyTag = 1; ++ } ++ tagLength = i; ++ break; ++ } ++ } ++ } ++ ++ /*Create XML Node, populate properties and add it to the list*/ ++ if (tagLength != 0) { ++ newNode = new XMLNode(); ++ newNode->tagName = tagName; ++ newNode->tagLength = tagLength; ++ newNode->startTag = startTag; ++ newNode->nsTag = nsTag; ++ newNode->nsLength = nsLength; ++ ++ ++ if (rootNode == NULL) { ++ rootNode = newNode; ++ } ++ else { ++ current->childNode = newNode; ++ } ++ current = newNode; ++ ++ if (emptyTag) { ++ newNode = new XMLNode(); ++ newNode->tagName = tagName; ++ newNode->tagLength = tagLength; ++ newNode->nsTag = nsTag; ++ newNode->nsLength = nsLength; ++ ++ current->emptyTag = 1; ++ current->childNode = newNode; ++ current = newNode; ++ } ++ } ++ ++ } ++ } ++ ++ xmlFields.clear(); ++ return rootNode; ++} ++ ++/* ++ * Parse the XML Tree from rootNode and retrive value of a given key. ++ * If rootNode is passed as NULL, parsing resumes from last key retrieved node. ++ * Return 0 on Success , -1 otherwise. ++ * Inputs : XMLNode *rootNode, char *tag, unsigned int tagLen, char *ns, unsigned int nsLen ++ * Outputs: char** value, unsigned int *valueLen ++ */ ++int MiniXmlParser::getXmlTagValue(XMLNode const* rootNode, char const* tag, unsigned int tagLen, char const* ns, unsigned int nsLen, char** value, unsigned int *valueLen) ++{ ++ ++ static XMLNode *cur = (XMLNode*) rootNode; ++ static XMLNode *pcur = cur; ++ char *pValue = NULL; ++ bool found = false; ++ ++ if (tag == NULL) { ++ return -1; ++ } ++ ++ if (rootNode != NULL) { ++ cur = (XMLNode *) rootNode; ++ pcur = cur; ++ } ++ ++ while (cur != NULL) { ++ while (pcur != NULL) { ++ if (pcur->closingTag && memcmp((pcur->tagName), tag, tagLen) == 0) { ++ if (ns) { ++ if (memcmp(pcur->nsTag, ns, pcur->nsLength) == 0) { ++ found = true; ++ } ++ } else { ++ found = true; ++ } ++ ++ if (found) { ++ pValue = strstr(pcur->tagName, ">") + 1; ++ if (pcur->closingTag->nsLength) { ++ *valueLen = pcur->closingTag->nsTag - pValue - 2; ++ } else { ++ *valueLen = pcur->closingTag->tagName - pValue - 2; ++ } ++ *value = pValue; ++ pcur = pcur->childNode; ++ return 0; ++ } ++ } ++ pcur = pcur->childNode; ++ } ++ cur = cur->siblingNode; ++ pcur = cur; ++ } ++ ++ return -1; ++} ++ ++/* Returns Namespace prefix of given URI namespace ++ * Inputs : XMLNode *node, char *uri, unsigned int uriLen ++ * Outputs: char **nsPrefix, unsigned int *nsPrefixLen ++ */ ++int MiniXmlParser::getNSPrefix(XMLNode const* node, char const* uri, unsigned int uriLen, char **nsPrefix, unsigned int *nsPrefixLen) { ++ ++ bool foundNS = false;; ++ char *tagEnd = NULL; ++ int rc = 0; ++ CDataLen tempNS; ++ CDataLen tempURI; ++ std::list<CDataLen> tags; ++ std::list<CDataLen> temp; ++ std::list<CDataLen> temp2; ++ std::list<CDataLen>::iterator it; ++ ++ if (node == NULL || uri == NULL) { ++ rc = -1; ++ return rc; ++ } ++ ++ tagEnd = strstr(node->tagName, ">"); ++ if (tagEnd && nsPrefix != NULL && nsPrefixLen != NULL) { ++ tags = Utils::split(node->tagName, tagEnd - node->tagName, " ", 1); ++ for (CDataLen tag: tags) { ++ temp = Utils::split(tag.data, tag.dataLength, ":", 1); ++ if (temp.size() >= 2) { ++ it = temp.begin(); ++ tempNS.data = it->data; ++ tempNS.dataLength = it->dataLength; ++ it++; ++ ++ if (memcmp(tempNS.data, "xmlns", 5) == 0) { ++ temp2 = Utils::split(it->data, it->dataLength, "=", 1); ++ if (temp2.size() >= 2) { ++ it = temp2.begin(); ++ tempNS.data = it->data; ++ tempNS.dataLength = it->dataLength; ++ it++; ++ } ++ } ++ //Ignore if first character is " or ' ++ if (it->data[0] == 34 || it->data[0] == 39) { ++ it->data = it->data + 1; ++ } ++ ++ if (memcmp(it->data, uri, uriLen) == 0) { ++ foundNS = true; ++ break; ++ } ++ } ++ } ++ } else { ++ rc = -1; ++ } ++ ++ if (rc == 0 && foundNS) { ++ *nsPrefix = tempNS.data; ++ *nsPrefixLen = tempNS.dataLength; ++ } ++ ++ return rc; ++} +diff --git a/src/tools/miniXmlParser.h b/src/tools/miniXmlParser.h +new file mode 100644 +index 0000000..ae0d234 +--- /dev/null ++++ b/src/tools/miniXmlParser.h +@@ -0,0 +1,51 @@ ++/******************************************************************************* ++ * Copyright (C) 2017 Intel Corporation. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * ++ * - Neither the name of Intel Corporation. nor the names of its ++ * contributors may be used to endorse or promote products derived from this ++ * software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS ++ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ *******************************************************************************/ ++#ifndef _MINIXMLPARSER_H ++#define _MINIXMLPARSER_H ++#include <iostream> ++#include "xmlNode.h" ++ ++class MiniXmlParser { ++ public: ++ MiniXmlParser(); ++ ~MiniXmlParser(); ++ int parse(char* buffer, unsigned int bufferLength); ++ XMLNode* getRootNode() { return rootNode; }; ++ int getXmlTagValue(XMLNode const* rootNode, char const *tag, unsigned int tagLen, char const* ns, unsigned int nsLen, char** value, unsigned int *valueLen); ++ int getNSPrefix(XMLNode const* nonde, char const* uri, unsigned int uriLen, char **nsPrefix, unsigned int *nsPrefixLen); ++ ++ private: ++ XMLNode* rootNode; ++ XMLNode* _parse(char const* buffer, unsigned int bufferLength); ++ /* Validates if the XML is well formed and sets up parent sibling pointers */ ++ int validateXML(XMLNode const* rootNode); ++ void deleteXmlTree(XMLNode *root); ++}; ++#endif +diff --git a/src/tools/utils.cpp b/src/tools/utils.cpp +new file mode 100644 +index 0000000..ec20b28 +--- /dev/null ++++ b/src/tools/utils.cpp +@@ -0,0 +1,185 @@ ++/******************************************************************************* ++ * Copyright (C) 2017 Intel Corporation. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * ++ * - Neither the name of Intel Corporation. nor the names of its ++ * contributors may be used to endorse or promote products derived from this ++ * software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS ++ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ *******************************************************************************/ ++#include <string.h> ++#include "utils.h" ++#include <syslog.h> ++#include <unistd.h> ++ ++std::vector<std::string> Utils::split(char const * str, char const * delim) { ++ char* tok = (char*)str; ++ char* ptok = tok; ++ int delimLength = 0; ++ std::vector<std::string> splittedStrings; ++ ++ do { ++ if (str == NULL) { ++ break; ++ } ++ ++ if (delim == NULL) { ++ splittedStrings.push_back(std::string(str)); ++ break; ++ } ++ ++ delimLength = strlen(delim); ++ tok = strstr(ptok, delim); ++ while (tok) { ++ if (ptok != tok) { ++ splittedStrings.push_back(std::string(ptok, tok-ptok)); ++ } ++ ptok = tok + delimLength; ++ tok = strstr(ptok, delim); ++ } ++ ++ if (ptok != str+strlen(str)) { ++ splittedStrings.push_back(std::string(ptok, strlen(ptok))); ++ } ++ } while(0); ++ return splittedStrings; ++} ++ ++ ++char* Utils::strnstr(char const* haystack, unsigned int haystackLength, char const* needle, unsigned int needleLength) { ++ ++ char* needleInHaystack = NULL; ++ unsigned int j; ++ do { ++ if (haystack == NULL || needle == NULL) { ++ break; ++ } ++ ++ for (unsigned int i = 0; i < haystackLength; i++) { ++ if (haystack[i] == '\0' || ((haystackLength - i) < needleLength)) { ++ break; ++ } ++ ++ for (j = 0; j < needleLength; j++) { ++ if (haystack[i + j] != needle[j]) { ++ break; ++ } ++ } ++ ++ if (j == needleLength) { ++ //Found needle in haystack ++ needleInHaystack = (char*)&haystack[i]; ++ break; ++ } ++ } ++ } while(0); ++ return needleInHaystack; ++} ++ ++std::list<CDataLen> Utils::split(char const* str, unsigned int strLength, char const* delim, unsigned int delimLength) { ++ char* tok = (char*)str; ++ char* ptok = tok; ++ std::list<CDataLen> splittedStrings; ++ CDataLen dataLen; ++ ++ do { ++ if (str == NULL) { ++ break; ++ } ++ ++ if (delim == NULL) { ++ dataLen.data = (char*)str; ++ dataLen.dataLength = strLength; ++ splittedStrings.push_back(dataLen); ++ break; ++ } ++ ++ tok = Utils::strnstr(str, strLength, delim, delimLength); ++ while (tok) { ++ dataLen.data = ptok; ++ dataLen.dataLength = tok-ptok; ++ if (ptok!=tok) { ++ splittedStrings.push_back(dataLen); ++ } ++ ptok = tok + delimLength; ++ tok = Utils::strnstr(ptok, (str + strLength - ptok), delim, delimLength); ++ } ++ ++ if (ptok != (str + strLength)) { ++ dataLen.data = ptok; ++ dataLen.dataLength = str + strLength - ptok; ++ splittedStrings.push_back(dataLen); ++ } ++ } while (0); ++ return splittedStrings; ++} ++ ++std::string Utils::DEFAULT_NOTIFY_CMD="export DISPLAY=:0; notify-send -u critical -t 2000 "; ++std::string Utils::NOTIFY_DESKTOP_SCRIPT="/usr/local/bin/notifyDesktop.sh"; ++std::string Utils::NOTIFY_DESKTOP_SCRIPT1="/usr/bin/notifyDesktop.sh"; ++ ++void Utils::notifyDesktop(std::string header, std::string body, bool logInSyslog) { ++ ++ std::string notifyCMD; ++ ++ if (! access (NOTIFY_DESKTOP_SCRIPT.c_str(), X_OK)) { ++ notifyCMD = NOTIFY_DESKTOP_SCRIPT + " '" + header + "' '" + body + "'"; ++ } else if (! access (NOTIFY_DESKTOP_SCRIPT1.c_str(), X_OK)) { ++ notifyCMD = NOTIFY_DESKTOP_SCRIPT1 + " '" + header + "' '" + body + "'"; ++ } else { ++ notifyCMD = DEFAULT_NOTIFY_CMD + " '" + header + "' '" + body + "'"; ++ } ++ ++ if (logInSyslog) { ++ syslog(LOG_INFO, "%s %s\n", header.c_str(), body.c_str()); ++ } ++ ++ system(notifyCMD.c_str()); ++} ++ ++ ++std::string Utils::format(const char *format , ...) { ++ char* buffer = NULL; ++ int bufferLength = 512; ++ int _bufferLength = 0; ++ va_list vl; ++ std::string formattedString(""); ++ ++ buffer = new char[bufferLength]; ++ if (buffer) { ++ va_start(vl, format); ++ ++ _bufferLength = vsnprintf(buffer, bufferLength, format, vl); ++ if (bufferLength <= _bufferLength) { ++ delete[] buffer; ++ buffer = new char[_bufferLength + 1]; ++ _bufferLength = vsnprintf(buffer, _bufferLength, format, vl); ++ } ++ ++ formattedString = std::string(buffer); ++ va_end(vl); ++ delete[] buffer; ++ } ++ ++ return formattedString; ++} +diff --git a/src/tools/utils.h b/src/tools/utils.h +new file mode 100644 +index 0000000..a7568fa +--- /dev/null ++++ b/src/tools/utils.h +@@ -0,0 +1,57 @@ ++/******************************************************************************* ++ * Copyright (C) 2017 Intel Corporation. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * ++ * - Neither the name of Intel Corporation. nor the names of its ++ * contributors may be used to endorse or promote products derived from this ++ * software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS ++ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ *******************************************************************************/ ++ ++#ifndef __UTILS_H ++#define __UTILS_H ++#include <iostream> ++#include <vector> ++#include <list> ++#include <string> ++#include <cstdarg> ++ ++class CDataLen { ++ public: ++ char* data; ++ int dataLength; ++ CDataLen() { data = NULL; dataLength = 0; }; ++}; ++ ++class Utils { ++ public: ++ static std::string NOTIFY_DESKTOP_SCRIPT; ++ static std::string NOTIFY_DESKTOP_SCRIPT1; ++ static std::string DEFAULT_NOTIFY_CMD; ++ static std::vector<std::string> split(char const* str, char const * delim); ++ static std::list<CDataLen> split(char const* str, unsigned int strLength, char const* delim, unsigned int delimLength); ++ static char* strnstr(char const* haystack, unsigned int haystackLength, char const* needle, unsigned int needleLength); ++ static void notifyDesktop(std::string header, std::string body, bool logInSyslog); ++ static std::string format(const char *format , ...); ++}; ++#endif +diff --git a/src/tools/xmlNode.cpp b/src/tools/xmlNode.cpp +new file mode 100644 +index 0000000..827cd3f +--- /dev/null ++++ b/src/tools/xmlNode.cpp +@@ -0,0 +1,45 @@ ++/******************************************************************************* ++ * Copyright (C) 2017 Intel Corporation. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * ++ * - Neither the name of Intel Corporation. nor the names of its ++ * contributors may be used to endorse or promote products derived from this ++ * software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS ++ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ *******************************************************************************/ ++#include "xmlNode.h" ++#include <iostream> ++XMLNode::XMLNode() { ++ tagName = NULL; ++ nsTag = NULL; ++ tagLength = 0; ++ nsLength = 0; ++ startTag = 0; ++ emptyTag = 0; ++ ++ closingTag = NULL; ++ startingTag = NULL; ++ parentNode = NULL; ++ childNode = NULL; ++ siblingNode = NULL; ++} +diff --git a/src/tools/xmlNode.h b/src/tools/xmlNode.h +new file mode 100644 +index 0000000..4a6c91e +--- /dev/null ++++ b/src/tools/xmlNode.h +@@ -0,0 +1,49 @@ ++/******************************************************************************* ++ * Copyright (C) 2017 Intel Corporation. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * ++ * - Neither the name of Intel Corporation. nor the names of its ++ * contributors may be used to endorse or promote products derived from this ++ * software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL Intel Corporation. OR THE CONTRIBUTORS ++ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ *******************************************************************************/ ++#ifndef __XMLNODE_H ++#define __XMLNODE_H ++class XMLNode { ++ ++ public: ++ char* tagName; ++ char* nsTag; ++ int tagLength; ++ int nsLength; ++ int startTag; ++ int emptyTag; ++ ++ XMLNode* closingTag; ++ XMLNode* startingTag; ++ XMLNode* parentNode; ++ XMLNode* childNode; ++ XMLNode* siblingNode; ++ XMLNode(); ++}; ++#endif +-- +2.9.3 + diff --git a/common/recipes-bsp/amt/lms7_7.1.20.bb b/common/recipes-bsp/amt/lms7_7.1.20.bb new file mode 100644 index 00000000..eca36811 --- /dev/null +++ b/common/recipes-bsp/amt/lms7_7.1.20.bb @@ -0,0 +1,58 @@ +DESCRIPTION = "Intel Local Manageability Service allows applications \ +to access the Intel Active Management Technology (AMT) firmware via \ +the Intel Management Engine Interface (MEI)." +HOMEPAGE = "http://software.intel.com/en-us/articles/download-the-latest-intel-amt-open-source-drivers" + +LICENSE = "BSD_LMS" + +PR = "r0" +BPN="lms" +PV_SUB = "25" +SRC_URI = "http://software.intel.com/sites/default/files/m/4/e/a/9/b/37962-${BPN}_${PV}.${PV_SUB}.zip \ + file://atnetworktool-printf-fix.patch \ + file://readlink-declaration.patch \ + file://0001-Protocol.cpp-Add-whitespace-for-gcc6-compile-error.patch \ + file://0001-Include-sys-select.h-for-fd_set.patch \ + file://0002-Use-proper-netinet-in.h-API.patch \ + " + +LOCALSRC = "file://${WORKDIR}/outputdir/${BPN}-${PV}-${PV_SUB}.tar.gz" + +COMPATIBLE_HOST = '(i.86|x86_64).*-linux' + +LIC_FILES_CHKSUM = "file://COPYING;md5=7264184cf88d9f27b719a9656255b47b" + +SRC_URI[md5sum] = "687b76e78bfdbcf567c0e842c1fe240a" +SRC_URI[sha256sum] = "cc0457f0044e924794bb1aeae9a72c28666a525cd8a963d0d92970222946e75b" + +inherit autotools update-rc.d + +INITSCRIPT_NAME = "lms7" +INITSCRIPT_PARAMS = "defaults" + +python do_unpack() { + s = d.getVar('S', True) + d.setVar('S', '${WORKDIR}/outputdir') + bb.build.exec_func('base_do_unpack', d) + # temorarily change SRC_URI for unpack + src_uri = d.getVar('SRC_URI', True) + d.setVar('SRC_URI', '${LOCALSRC}') + d.setVar('S', s) + bb.build.exec_func('base_do_unpack', d) + d.setVar('SRC_URI', src_uri) +} + + +do_install_append () { + mv ${D}/${sbindir}/lms ${D}/${sbindir}/lms7 + install -d ${D}${sysconfdir}/init.d + # The configure script looks at the host to decide where to put init + # scripts, so move it at the same time as renaming it. + if test -f ${D}${sysconfdir}/rc.d/init.d/lms ; then + mv ${D}${sysconfdir}/rc.d/init.d/lms ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME} + else + mv ${D}${sysconfdir}/init.d/lms ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME} + fi + sed -i 's/^NAME=lms/NAME=lms7/' ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME} + rmdir ${D}${datadir} || : +} diff --git a/common/recipes-bsp/amt/lms8_8.0.0-7.bb b/common/recipes-bsp/amt/lms8_8.0.0-7.bb new file mode 100644 index 00000000..9b37b9b4 --- /dev/null +++ b/common/recipes-bsp/amt/lms8_8.0.0-7.bb @@ -0,0 +1,46 @@ +DESCRIPTION = "Intel Local Manageability Service allows applications \ +to access the Intel Active Management Technology (AMT) firmware via \ +the Intel Management Engine Interface (MEI)." +HOMEPAGE = "http://software.intel.com/en-us/articles/download-the-latest-intel-amt-open-source-drivers" + +LICENSE = "BSD_LMS" + +PR = "r0" +BPN="lms" +SRC_URI = "http://software.intel.com/sites/default/files/${BPN}-${PV}.tar.gz \ + file://readlink-declaration.patch \ + file://0001-Protocol.cpp-Add-whitespace-for-gcc6-compile-error.patch \ + file://0001-Include-sys-select.h-for-fd_set.patch \ + file://0002-Use-proper-netinet-in.h-API.patch \ + file://0003-Fix-device-file-referance-to-dev-mei0-remove-select.patch \ + file://0004-Intel-AMT-ME-real-time-notification-infra.patch \ + " + +FILES_${PN} += "${datadir}/xml/AMTAlerts.xml" + +COMPATIBLE_HOST = '(i.86|x86_64).*-linux' + +LIC_FILES_CHKSUM = "file://COPYING;md5=ec77c894e8a1a89fa07aed2c76680ab8" + +SRC_URI[md5sum] = "3cbd027a0e6e9ced8238478b24cde3c6" +SRC_URI[sha256sum] = "7077db6f2f381e67cb37565b20c40ff0c7d3f98f014e65622a4b4b66c2b1d637" + +inherit autotools update-rc.d + +INITSCRIPT_NAME = "lms8" +INITSCRIPT_PARAMS = "defaults" + + +do_install_append () { + mv ${D}/${sbindir}/lms ${D}/${sbindir}/lms8 + install -d ${D}${sysconfdir}/init.d + # The configure script looks at the host to decide where to put init + # scripts, so move it at the same time as renaming it. + if test -f ${D}${sysconfdir}/rc.d/init.d/lms ; then + mv ${D}${sysconfdir}/rc.d/init.d/lms ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME} + else + mv ${D}${sysconfdir}/init.d/lms ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME} + fi + sed -i 's/^NAME=lms/NAME=lms8/' ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME} + rmdir ${D}${datadir} || : +} diff --git a/common/recipes-bsp/efilinux/efilinux/0001-Disable-address-of-packed-member-warning.patch b/common/recipes-bsp/efilinux/efilinux/0001-Disable-address-of-packed-member-warning.patch new file mode 100644 index 00000000..afb99514 --- /dev/null +++ b/common/recipes-bsp/efilinux/efilinux/0001-Disable-address-of-packed-member-warning.patch @@ -0,0 +1,33 @@ +From 7c171c1813651a3a02ad2cda361b42ebc7ce324d Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 12 Aug 2017 10:34:19 -0700 +Subject: [PATCH 1/2] Disable address-of-packed-member warning + +Clang complains so make it happy + +loaders/bzimage/bzimage.c:346:55: error: taking address of packed member 'base' of class or structure 'dt_addr_t' may result in an unaligned pointer value [-Werror,-Waddress-of-packed-member] + err = emalloc(gdt.limit, 8, (EFI_PHYSICAL_ADDRESS *)&gdt.base); + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index a955e34..ff1b79b 100644 +--- a/Makefile ++++ b/Makefile +@@ -61,7 +61,7 @@ ifeq ($(ARCH),ia32) + endif + endif + ifeq ($(ARCH),x86_64) +- CFLAGS += -mno-red-zone ++ CFLAGS += -mno-red-zone -Wno-address-of-packed-member + endif + + LDFLAGS=-T $(LDSCRIPT) -Bsymbolic -shared -nostdlib -znocombreloc \ +-- +2.14.1 + diff --git a/common/recipes-bsp/efilinux/efilinux/0002-initialize-char-pointers.patch b/common/recipes-bsp/efilinux/efilinux/0002-initialize-char-pointers.patch new file mode 100644 index 00000000..127c187a --- /dev/null +++ b/common/recipes-bsp/efilinux/efilinux/0002-initialize-char-pointers.patch @@ -0,0 +1,33 @@ +From 49053e4ff0f3550d019cdad8a93677c18fc69791 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 12 Aug 2017 10:35:09 -0700 +Subject: [PATCH 2/2] initialize char pointers + +Clang complains about using them without initializing + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + entry.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/entry.c b/entry.c +index 0aa6cdd..23ba51e 100644 +--- a/entry.c ++++ b/entry.c +@@ -402,9 +402,9 @@ efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *_table) + WCHAR *error_buf; + EFI_STATUS err; + EFI_LOADED_IMAGE *info; +- CHAR16 *name, *options; ++ CHAR16 *name = NULL, *options; + UINT32 options_size; +- char *cmdline; ++ char *cmdline = NULL; + + InitializeLib(image, _table); + sys_table = _table; +-- +2.14.1 + diff --git a/common/recipes-bsp/efilinux/efilinux_1.1.bb b/common/recipes-bsp/efilinux/efilinux_1.1.bb new file mode 100644 index 00000000..63e80f88 --- /dev/null +++ b/common/recipes-bsp/efilinux/efilinux_1.1.bb @@ -0,0 +1,38 @@ +DESCRIPTION = "A UEFI OS loader" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://efilinux.h;beginline=5;endline=27;md5=f8d56e644672ac63fd81b55c205283ad" + +DEPENDS = "gnu-efi" + +inherit deploy + +SRCREV = "a995826f9e43f1134baea61610eafd8c173bb776" +PV = "1.1+git${SRCPV}" + +SRC_URI = "git://git.kernel.org/pub/scm/boot/efilinux/efilinux.git \ + file://0001-Disable-address-of-packed-member-warning.patch \ + file://0002-initialize-char-pointers.patch \ + " + +S = "${WORKDIR}/git" + +COMPATIBLE_HOST = '(x86_64|i.86).*-(linux|freebsd.*)' + +EXTRA_OEMAKE = "INCDIR=${STAGING_INCDIR} LIBDIR=${STAGING_LIBDIR}" + +# syslinux uses $LD for linking, strip `-Wl,' so it can work +export LDFLAGS = "`echo $LDFLAGS | sed 's/-Wl,//g'`" + +do_deploy () { + install ${S}/efilinux.efi ${DEPLOYDIR}/efilinux.efi +} +addtask deploy before do_build after do_compile + +python () { + ccargs = d.getVar('TUNE_CCARGS').split() + if '-mx32' in ccargs: + # use x86_64 EFI ABI + ccargs.remove('-mx32') + ccargs.append('-m64') + d.setVar('TUNE_CCARGS', ' '.join(ccargs)) +} diff --git a/common/recipes-bsp/formfactor/formfactor/machconfig b/common/recipes-bsp/formfactor/formfactor/machconfig new file mode 100644 index 00000000..73695fac --- /dev/null +++ b/common/recipes-bsp/formfactor/formfactor/machconfig @@ -0,0 +1,39 @@ +# Note: superuser permission is required to run usbhid-dump +# successfully. + +# HEX keys are according to the USB HID spec and USB HID usage table +# We can add more keys as needed in the future. + +# This test may not be very accurate, as we only look for the first +# two lines of a descriptor section. Example: +# +# 001:003:000:DESCRIPTOR 1460501386.337809 +# 05 01 09 02 A1 01 09 01 A1 00 05 09 19 01 29 03 +# 15 00 25 01 95 03 75 01 81 02 .. .. .. .. .. .. +# .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. +# +# By doing so we eliminate false matches when HEX keys are in the lines +# in the middle of the whole descriptor section. + +if type usbhid-dump &>/dev/null; then + if USBHID_DUMP_OUTPUT=$(usbhid-dump -e descriptor 2>/dev/null|grep -A1 DESCRIPTOR); then + # checker for generic USB HID keyboard + USBHID_KBD_CMD="grep -E '^ 05 01 09 06'" + + # checker for touch screen + USBHID_TS_CMD="grep -E '^ 05 0D 09 04'" + + if echo "$USBHID_DUMP_OUTPUT"|eval $USBHID_TS_CMD &>/dev/null; then + HAVE_TOUCHSCREEN=1 + fi + + if echo "$USBHID_DUMP_OUTPUT"|eval $USBHID_KBD_CMD &>/dev/null; then + HAVE_KEYBOARD=1 + else + # config script in OE will set HAVE_KEYBOARD=1 + # if we don't set any value. We have to explicitly + # tell it when keyboard is not detected. + HAVE_KEYBOARD=0 + fi + fi +fi diff --git a/common/recipes-bsp/formfactor/formfactor_0.0.bbappend b/common/recipes-bsp/formfactor/formfactor_0.0.bbappend new file mode 100644 index 00000000..6dd422ae --- /dev/null +++ b/common/recipes-bsp/formfactor/formfactor_0.0.bbappend @@ -0,0 +1 @@ +FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" diff --git a/common/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf b/common/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf new file mode 100644 index 00000000..74d33c87 --- /dev/null +++ b/common/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf @@ -0,0 +1,2 @@ +# Mimic modprobe's install funcitonality with busybox's modprobe +install gma500_gfx dmesg | grep gma500_gfx_checked || { /etc/modprobe.d/gma500-gfx-check.sh || modprobe gma500_gfx; } diff --git a/common/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh b/common/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh new file mode 100644 index 00000000..75cda99f --- /dev/null +++ b/common/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# Check for devices we wish to avoid gma500_gfx for +DEVICES="0x8119 0x4108" + +# Checked flag to avoid infinite modprobe +echo "gma500_gfx_checked" >> /dev/kmsg; + +for DEVICE in $DEVICES; do + if udevadm trigger --subsystem-match=pci --verbose --attr-match=device=$DEVICE | grep "pci" >> /dev/null ; then + echo "Found $DEVICE, avoiding gma500_gfx module" >> /dev/kmsg; + exit 0 + fi +done +exit 1 diff --git a/common/recipes-bsp/gma500-gfx-check/gma500-gfx-check_1.0.bb b/common/recipes-bsp/gma500-gfx-check/gma500-gfx-check_1.0.bb new file mode 100644 index 00000000..7b08064b --- /dev/null +++ b/common/recipes-bsp/gma500-gfx-check/gma500-gfx-check_1.0.bb @@ -0,0 +1,18 @@ +SUMMARY = "Intel gma500_gfx fix for certain hardware" +DESCRIPTION = "Avoid inserting gma500_gfx module for certain hardware devices." +LICENSE="GPLv2" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" + +SRC_URI = "file://gma500-gfx-check.conf \ + file://gma500-gfx-check.sh " + +do_install(){ + install -d ${D}${sysconfdir}/modprobe.d/ + install -m 755 ${WORKDIR}/gma500-gfx-check.sh ${D}${sysconfdir}/modprobe.d/gma500-gfx-check.sh + install -m 644 ${WORKDIR}/gma500-gfx-check.conf ${D}${sysconfdir}/modprobe.d/gma500-gfx-check.conf +} + +FILES_${PN}="${sysconfdir}/modprobe.d/gma500-gfx-check.conf \ + ${sysconfdir}/modprobe.d/gma500-gfx-check.sh" + +COMPATIBLE_MACHINE = "intel-core2-32" diff --git a/common/recipes-bsp/rmc/boards/Galileo2/BOOTENTRY.CONFIG b/common/recipes-bsp/rmc/boards/Galileo2/BOOTENTRY.CONFIG new file mode 100644 index 00000000..dd1b9114 --- /dev/null +++ b/common/recipes-bsp/rmc/boards/Galileo2/BOOTENTRY.CONFIG @@ -0,0 +1,3 @@ +boot.conf +install.conf + diff --git a/common/recipes-bsp/rmc/boards/Galileo2/boot.conf b/common/recipes-bsp/rmc/boards/Galileo2/boot.conf new file mode 100644 index 00000000..580ea486 --- /dev/null +++ b/common/recipes-bsp/rmc/boards/Galileo2/boot.conf @@ -0,0 +1,4 @@ +title Galileo Gen 2 boot +linux /vmlinuz +initrd /initrd +options LABEL=boot rootwait console=ttyS1,115200 diff --git a/common/recipes-bsp/rmc/boards/Galileo2/gallieo2.fp b/common/recipes-bsp/rmc/boards/Galileo2/gallieo2.fp Binary files differnew file mode 100755 index 00000000..fe77d4d1 --- /dev/null +++ b/common/recipes-bsp/rmc/boards/Galileo2/gallieo2.fp diff --git a/common/recipes-bsp/rmc/boards/Galileo2/install.conf b/common/recipes-bsp/rmc/boards/Galileo2/install.conf new file mode 100644 index 00000000..688c2a8f --- /dev/null +++ b/common/recipes-bsp/rmc/boards/Galileo2/install.conf @@ -0,0 +1,4 @@ +title Galileo Gen 2 install +linux /vmlinuz +initrd /initrd +options LABEL=install-efi rootwait console=ttyS1,115200 diff --git a/common/recipes-bsp/rmc/boards/MinnowboardTurbot/KBOOTPARAM b/common/recipes-bsp/rmc/boards/MinnowboardTurbot/KBOOTPARAM new file mode 100644 index 00000000..476b1fbe --- /dev/null +++ b/common/recipes-bsp/rmc/boards/MinnowboardTurbot/KBOOTPARAM @@ -0,0 +1 @@ +console=ttyS0,115200 diff --git a/common/recipes-bsp/rmc/boards/MinnowboardTurbot/minnowboardturbot.fp b/common/recipes-bsp/rmc/boards/MinnowboardTurbot/minnowboardturbot.fp Binary files differnew file mode 100644 index 00000000..9aa145f3 --- /dev/null +++ b/common/recipes-bsp/rmc/boards/MinnowboardTurbot/minnowboardturbot.fp diff --git a/common/recipes-bsp/rmc/boards/NUC5i5RYB/BOOTENTRY.CONFIG b/common/recipes-bsp/rmc/boards/NUC5i5RYB/BOOTENTRY.CONFIG new file mode 100644 index 00000000..b2fabe82 --- /dev/null +++ b/common/recipes-bsp/rmc/boards/NUC5i5RYB/BOOTENTRY.CONFIG @@ -0,0 +1,2 @@ +boot.conf +install.conf diff --git a/common/recipes-bsp/rmc/boards/NUC5i5RYB/INSTALLER.CONFIG b/common/recipes-bsp/rmc/boards/NUC5i5RYB/INSTALLER.CONFIG new file mode 100644 index 00000000..ca5f04b9 --- /dev/null +++ b/common/recipes-bsp/rmc/boards/NUC5i5RYB/INSTALLER.CONFIG @@ -0,0 +1,2 @@ +efi_entry_dir:root:disk:770:/boot/loader/entries/ +boot.conf:root:disk:770:/boot/loader/entries/rmcboot.conf diff --git a/common/recipes-bsp/rmc/boards/NUC5i5RYB/POSTINSTALL.sh b/common/recipes-bsp/rmc/boards/NUC5i5RYB/POSTINSTALL.sh new file mode 100644 index 00000000..6694261b --- /dev/null +++ b/common/recipes-bsp/rmc/boards/NUC5i5RYB/POSTINSTALL.sh @@ -0,0 +1,2 @@ +# There is no tty device on this board. +sed -i '/start_getty.\+ttyS.*/d' /tgt_root/etc/inittab diff --git a/common/recipes-bsp/rmc/boards/NUC5i5RYB/boot.conf b/common/recipes-bsp/rmc/boards/NUC5i5RYB/boot.conf new file mode 100644 index 00000000..b29fa45e --- /dev/null +++ b/common/recipes-bsp/rmc/boards/NUC5i5RYB/boot.conf @@ -0,0 +1,4 @@ +title NUC5i5RYB boot +linux /vmlinuz +initrd /initrd +options LABEL=boot rootwait diff --git a/common/recipes-bsp/rmc/boards/NUC5i5RYB/install.conf b/common/recipes-bsp/rmc/boards/NUC5i5RYB/install.conf new file mode 100644 index 00000000..0dca3cae --- /dev/null +++ b/common/recipes-bsp/rmc/boards/NUC5i5RYB/install.conf @@ -0,0 +1,4 @@ +title NUC5i5RYB install +linux /vmlinuz +initrd /initrd +options LABEL=install-efi rootwait diff --git a/common/recipes-bsp/rmc/boards/NUC5i5RYB/nuc5i5.fp b/common/recipes-bsp/rmc/boards/NUC5i5RYB/nuc5i5.fp Binary files differnew file mode 100644 index 00000000..57374779 --- /dev/null +++ b/common/recipes-bsp/rmc/boards/NUC5i5RYB/nuc5i5.fp diff --git a/common/recipes-bsp/rmc/boards/T100-32bit/BOOTENTRY.CONFIG b/common/recipes-bsp/rmc/boards/T100-32bit/BOOTENTRY.CONFIG new file mode 100644 index 00000000..b2fabe82 --- /dev/null +++ b/common/recipes-bsp/rmc/boards/T100-32bit/BOOTENTRY.CONFIG @@ -0,0 +1,2 @@ +boot.conf +install.conf diff --git a/common/recipes-bsp/rmc/boards/T100-32bit/T100-32bit.fp b/common/recipes-bsp/rmc/boards/T100-32bit/T100-32bit.fp Binary files differnew file mode 100644 index 00000000..86ecea73 --- /dev/null +++ b/common/recipes-bsp/rmc/boards/T100-32bit/T100-32bit.fp diff --git a/common/recipes-bsp/rmc/boards/T100-32bit/boot.conf b/common/recipes-bsp/rmc/boards/T100-32bit/boot.conf new file mode 100644 index 00000000..f1578e0f --- /dev/null +++ b/common/recipes-bsp/rmc/boards/T100-32bit/boot.conf @@ -0,0 +1,4 @@ +title T100T(32bit) boot +linux /vmlinuz +initrd /initrd +options LABEL=boot loglevel=8 diff --git a/common/recipes-bsp/rmc/boards/T100-32bit/install.conf b/common/recipes-bsp/rmc/boards/T100-32bit/install.conf new file mode 100644 index 00000000..67e7eb18 --- /dev/null +++ b/common/recipes-bsp/rmc/boards/T100-32bit/install.conf @@ -0,0 +1,4 @@ +title T100T(32bit) install +linux /vmlinuz +initrd /initrd +options LABEL=install-efi diff --git a/common/recipes-bsp/rmc/boards/broxton-m/BOOTENTRY.CONFIG b/common/recipes-bsp/rmc/boards/broxton-m/BOOTENTRY.CONFIG new file mode 100644 index 00000000..b2fabe82 --- /dev/null +++ b/common/recipes-bsp/rmc/boards/broxton-m/BOOTENTRY.CONFIG @@ -0,0 +1,2 @@ +boot.conf +install.conf diff --git a/common/recipes-bsp/rmc/boards/broxton-m/INSTALLER.CONFIG b/common/recipes-bsp/rmc/boards/broxton-m/INSTALLER.CONFIG new file mode 100644 index 00000000..ecd20609 --- /dev/null +++ b/common/recipes-bsp/rmc/boards/broxton-m/INSTALLER.CONFIG @@ -0,0 +1,3 @@ +# Keep rmc Joule boot.conf instead of meta-intel default +efi_entry_dir:root:disk:770:/boot/loader/entries/ +boot.conf:root:disk:770:/boot/loader/entries/boot.conf diff --git a/common/recipes-bsp/rmc/boards/broxton-m/KBOOTPARAM b/common/recipes-bsp/rmc/boards/broxton-m/KBOOTPARAM new file mode 100644 index 00000000..08be5dfb --- /dev/null +++ b/common/recipes-bsp/rmc/boards/broxton-m/KBOOTPARAM @@ -0,0 +1 @@ +video=efifb maxcpus=4 reboot=efi kmemleak=off console=tty0 console=ttyS2,115200 diff --git a/common/recipes-bsp/rmc/boards/broxton-m/POSTINSTALL.sh b/common/recipes-bsp/rmc/boards/broxton-m/POSTINSTALL.sh new file mode 100644 index 00000000..30bbd28e --- /dev/null +++ b/common/recipes-bsp/rmc/boards/broxton-m/POSTINSTALL.sh @@ -0,0 +1,2 @@ +# Joule uses only S2 for serial, so remove S0 +sed -i '/start_getty.\+ttyS0/d' /tgt_root/etc/inittab diff --git a/common/recipes-bsp/rmc/boards/broxton-m/bm-1F1.fp b/common/recipes-bsp/rmc/boards/broxton-m/bm-1F1.fp Binary files differnew file mode 100755 index 00000000..1a150280 --- /dev/null +++ b/common/recipes-bsp/rmc/boards/broxton-m/bm-1F1.fp diff --git a/common/recipes-bsp/rmc/boards/broxton-m/bm.fp b/common/recipes-bsp/rmc/boards/broxton-m/bm.fp Binary files differnew file mode 100755 index 00000000..135a7a5d --- /dev/null +++ b/common/recipes-bsp/rmc/boards/broxton-m/bm.fp diff --git a/common/recipes-bsp/rmc/boards/broxton-m/boot.conf b/common/recipes-bsp/rmc/boards/broxton-m/boot.conf new file mode 100644 index 00000000..caa00c50 --- /dev/null +++ b/common/recipes-bsp/rmc/boards/broxton-m/boot.conf @@ -0,0 +1,4 @@ +title Joule / Broxton-m +linux /vmlinuz +initrd /initrd +options LABEL=boot diff --git a/common/recipes-bsp/rmc/boards/broxton-m/install.conf b/common/recipes-bsp/rmc/boards/broxton-m/install.conf new file mode 100644 index 00000000..9cdd86b7 --- /dev/null +++ b/common/recipes-bsp/rmc/boards/broxton-m/install.conf @@ -0,0 +1,4 @@ +title Joule / Broxton-m Install +linux /vmlinuz +initrd /initrd +options LABEL=install-efi rootwait diff --git a/common/recipes-bsp/rmc/boards/broxton-m/joule-1F1.fp b/common/recipes-bsp/rmc/boards/broxton-m/joule-1F1.fp Binary files differnew file mode 100644 index 00000000..d757614f --- /dev/null +++ b/common/recipes-bsp/rmc/boards/broxton-m/joule-1F1.fp diff --git a/common/recipes-bsp/rmc/boards/minnowmax/BOOTENTRY.CONFIG b/common/recipes-bsp/rmc/boards/minnowmax/BOOTENTRY.CONFIG new file mode 100644 index 00000000..b2fabe82 --- /dev/null +++ b/common/recipes-bsp/rmc/boards/minnowmax/BOOTENTRY.CONFIG @@ -0,0 +1,2 @@ +boot.conf +install.conf diff --git a/common/recipes-bsp/rmc/boards/minnowmax/boot.conf b/common/recipes-bsp/rmc/boards/minnowmax/boot.conf new file mode 100644 index 00000000..6e789cd8 --- /dev/null +++ b/common/recipes-bsp/rmc/boards/minnowmax/boot.conf @@ -0,0 +1,4 @@ +title Minnow Max boot +linux /vmlinuz +initrd /initrd +options LABEL=boot console=ttyS0,115200n8 diff --git a/common/recipes-bsp/rmc/boards/minnowmax/install.conf b/common/recipes-bsp/rmc/boards/minnowmax/install.conf new file mode 100644 index 00000000..1a493aec --- /dev/null +++ b/common/recipes-bsp/rmc/boards/minnowmax/install.conf @@ -0,0 +1,4 @@ +title Minnow Max install +linux /vmlinuz +initrd /initrd +options LABEL=install-efi console=ttyS0,115200n8 diff --git a/common/recipes-bsp/rmc/boards/minnowmax/minnowmax.fp b/common/recipes-bsp/rmc/boards/minnowmax/minnowmax.fp Binary files differnew file mode 100644 index 00000000..3c5a286f --- /dev/null +++ b/common/recipes-bsp/rmc/boards/minnowmax/minnowmax.fp diff --git a/common/recipes-bsp/rmc/boards/minnowmaxB3/BOOTENTRY.CONFIG b/common/recipes-bsp/rmc/boards/minnowmaxB3/BOOTENTRY.CONFIG new file mode 100644 index 00000000..b2fabe82 --- /dev/null +++ b/common/recipes-bsp/rmc/boards/minnowmaxB3/BOOTENTRY.CONFIG @@ -0,0 +1,2 @@ +boot.conf +install.conf diff --git a/common/recipes-bsp/rmc/boards/minnowmaxB3/boot.conf b/common/recipes-bsp/rmc/boards/minnowmaxB3/boot.conf new file mode 100644 index 00000000..577e5d6a --- /dev/null +++ b/common/recipes-bsp/rmc/boards/minnowmaxB3/boot.conf @@ -0,0 +1,4 @@ +title Minnow Max B3 boot +linux /vmlinuz +initrd /initrd +options LABEL=boot console=ttyS0,115200n8 diff --git a/common/recipes-bsp/rmc/boards/minnowmaxB3/install.conf b/common/recipes-bsp/rmc/boards/minnowmaxB3/install.conf new file mode 100644 index 00000000..cf500d6c --- /dev/null +++ b/common/recipes-bsp/rmc/boards/minnowmaxB3/install.conf @@ -0,0 +1,4 @@ +title Minnow Max B3 install +linux /vmlinuz +initrd /initrd +options LABEL=install-efi console=ttyS0,115200n8 diff --git a/common/recipes-bsp/rmc/boards/minnowmaxB3/minnowmaxB3.fp b/common/recipes-bsp/rmc/boards/minnowmaxB3/minnowmaxB3.fp Binary files differnew file mode 100644 index 00000000..ad3f0d6d --- /dev/null +++ b/common/recipes-bsp/rmc/boards/minnowmaxB3/minnowmaxB3.fp diff --git a/common/recipes-bsp/rmc/boards/mohonpeak/BOOTENTRY.CONFIG b/common/recipes-bsp/rmc/boards/mohonpeak/BOOTENTRY.CONFIG new file mode 100644 index 00000000..b2fabe82 --- /dev/null +++ b/common/recipes-bsp/rmc/boards/mohonpeak/BOOTENTRY.CONFIG @@ -0,0 +1,2 @@ +boot.conf +install.conf diff --git a/common/recipes-bsp/rmc/boards/mohonpeak/INSTALLER.CONFIG b/common/recipes-bsp/rmc/boards/mohonpeak/INSTALLER.CONFIG new file mode 100644 index 00000000..8c5a7678 --- /dev/null +++ b/common/recipes-bsp/rmc/boards/mohonpeak/INSTALLER.CONFIG @@ -0,0 +1,3 @@ +# Keep rmc Mohonpeak boot.conf instead of meta-intel default +efi_entry_dir:root:disk:770:/boot/loader/entries/ +boot.conf:root:disk:770:/boot/loader/entries/boot.conf diff --git a/common/recipes-bsp/rmc/boards/mohonpeak/KBOOTPARAM b/common/recipes-bsp/rmc/boards/mohonpeak/KBOOTPARAM new file mode 100644 index 00000000..169056ee --- /dev/null +++ b/common/recipes-bsp/rmc/boards/mohonpeak/KBOOTPARAM @@ -0,0 +1 @@ +console=ttyS1,115200 console=tty1 diff --git a/common/recipes-bsp/rmc/boards/mohonpeak/POSTINSTALL.sh b/common/recipes-bsp/rmc/boards/mohonpeak/POSTINSTALL.sh new file mode 100644 index 00000000..5f440c38 --- /dev/null +++ b/common/recipes-bsp/rmc/boards/mohonpeak/POSTINSTALL.sh @@ -0,0 +1,3 @@ +# Mohonpeak uses only S1 for serial, so remove S0 and S2 +sed -i '/start_getty.\+ttyS0/d' /tgt_root/etc/inittab +sed -i '/start_getty.\+ttyS2/d' /tgt_root/etc/inittab diff --git a/common/recipes-bsp/rmc/boards/mohonpeak/boot.conf b/common/recipes-bsp/rmc/boards/mohonpeak/boot.conf new file mode 100644 index 00000000..5b7a0f63 --- /dev/null +++ b/common/recipes-bsp/rmc/boards/mohonpeak/boot.conf @@ -0,0 +1,4 @@ +title Mohon Peak boot +linux /vmlinuz +initrd /initrd +options LABEL=boot diff --git a/common/recipes-bsp/rmc/boards/mohonpeak/install.conf b/common/recipes-bsp/rmc/boards/mohonpeak/install.conf new file mode 100644 index 00000000..dde3497d --- /dev/null +++ b/common/recipes-bsp/rmc/boards/mohonpeak/install.conf @@ -0,0 +1,4 @@ +title Mohon Peak Install +linux /vmlinuz +initrd /initrd +options LABEL=install-efi rootwait diff --git a/common/recipes-bsp/rmc/boards/mohonpeak/mohonpeak.fp b/common/recipes-bsp/rmc/boards/mohonpeak/mohonpeak.fp Binary files differnew file mode 100644 index 00000000..bc4bdae4 --- /dev/null +++ b/common/recipes-bsp/rmc/boards/mohonpeak/mohonpeak.fp diff --git a/common/recipes-bsp/rmc/boards/nucgen6/BOOTENTRY.CONFIG b/common/recipes-bsp/rmc/boards/nucgen6/BOOTENTRY.CONFIG new file mode 100644 index 00000000..b2fabe82 --- /dev/null +++ b/common/recipes-bsp/rmc/boards/nucgen6/BOOTENTRY.CONFIG @@ -0,0 +1,2 @@ +boot.conf +install.conf diff --git a/common/recipes-bsp/rmc/boards/nucgen6/INSTALLER.CONFIG b/common/recipes-bsp/rmc/boards/nucgen6/INSTALLER.CONFIG new file mode 100644 index 00000000..7d5378b2 --- /dev/null +++ b/common/recipes-bsp/rmc/boards/nucgen6/INSTALLER.CONFIG @@ -0,0 +1,6 @@ +# This file specifies which file or dir RMC will install onto target. +# Note the absolute path is referred from mount points in installation. +efi_entry_dir:root:disk:770:/boot/loader/entries/ +boot.conf:root:disk:770:/boot/loader/entries/rmcboot.conf +mylibdir:root:root:770:/tgt_root/etc/mylib/ +mylib.conf:root:root:660:/tgt_root/etc/mylib/mylib.conf diff --git a/common/recipes-bsp/rmc/boards/nucgen6/KBOOTPARAM b/common/recipes-bsp/rmc/boards/nucgen6/KBOOTPARAM new file mode 100644 index 00000000..27943b49 --- /dev/null +++ b/common/recipes-bsp/rmc/boards/nucgen6/KBOOTPARAM @@ -0,0 +1 @@ +i915.preliminary_hw_support=1 diff --git a/common/recipes-bsp/rmc/boards/nucgen6/POSTINSTALL.sh b/common/recipes-bsp/rmc/boards/nucgen6/POSTINSTALL.sh new file mode 100644 index 00000000..bec3be42 --- /dev/null +++ b/common/recipes-bsp/rmc/boards/nucgen6/POSTINSTALL.sh @@ -0,0 +1,7 @@ +# NUC Gen 6 specific retouch after RMC deployment + +# The generated inittab from OE build causes error messages: +# "auth.err getty[615]: tcgetattr: Input/output error" +# in /var/log/messages because NUC Gen 6 doesn't have any +# serial tty. We delete line(s) here on target. +sed -i '/start_getty.\+ttyS.*/d' /tgt_root/etc/inittab diff --git a/common/recipes-bsp/rmc/boards/nucgen6/boot.conf b/common/recipes-bsp/rmc/boards/nucgen6/boot.conf new file mode 100644 index 00000000..e6ecb029 --- /dev/null +++ b/common/recipes-bsp/rmc/boards/nucgen6/boot.conf @@ -0,0 +1,4 @@ +title NUC Gen6 boot +linux /vmlinuz +initrd /initrd +options LABEL=boot diff --git a/common/recipes-bsp/rmc/boards/nucgen6/install.conf b/common/recipes-bsp/rmc/boards/nucgen6/install.conf new file mode 100644 index 00000000..916bb04b --- /dev/null +++ b/common/recipes-bsp/rmc/boards/nucgen6/install.conf @@ -0,0 +1,4 @@ +title NUC Gen6 install +linux /vmlinuz +initrd /initrd +options LABEL=install-efi diff --git a/common/recipes-bsp/rmc/boards/nucgen6/mylib.conf b/common/recipes-bsp/rmc/boards/nucgen6/mylib.conf new file mode 100644 index 00000000..fd8357c2 --- /dev/null +++ b/common/recipes-bsp/rmc/boards/nucgen6/mylib.conf @@ -0,0 +1,7 @@ +# This is a demo conf file read by an imagined program or library +# which reads this file at runtime to customize its behavior. +# rmc will deploy it to the location specified in INSTALLER.CONFIG. + +lib.info = "V1.0 for rmc demo" +lib.board = "NUC gen 6" +prog.ui.layout = "minimal" diff --git a/common/recipes-bsp/rmc/boards/nucgen6/nuc6.fp b/common/recipes-bsp/rmc/boards/nucgen6/nuc6.fp Binary files differnew file mode 100644 index 00000000..834f800b --- /dev/null +++ b/common/recipes-bsp/rmc/boards/nucgen6/nuc6.fp diff --git a/common/recipes-bsp/rmc/boards/qemu-2.6/KBOOTPARAM b/common/recipes-bsp/rmc/boards/qemu-2.6/KBOOTPARAM new file mode 100644 index 00000000..476b1fbe --- /dev/null +++ b/common/recipes-bsp/rmc/boards/qemu-2.6/KBOOTPARAM @@ -0,0 +1 @@ +console=ttyS0,115200 diff --git a/common/recipes-bsp/rmc/boards/qemu-2.6/qemu-2.6.fp b/common/recipes-bsp/rmc/boards/qemu-2.6/qemu-2.6.fp Binary files differnew file mode 100644 index 00000000..e4c41657 --- /dev/null +++ b/common/recipes-bsp/rmc/boards/qemu-2.6/qemu-2.6.fp diff --git a/common/recipes-bsp/rmc/boards/qemu-2.8/KBOOTPARAM b/common/recipes-bsp/rmc/boards/qemu-2.8/KBOOTPARAM new file mode 100644 index 00000000..476b1fbe --- /dev/null +++ b/common/recipes-bsp/rmc/boards/qemu-2.8/KBOOTPARAM @@ -0,0 +1 @@ +console=ttyS0,115200 diff --git a/common/recipes-bsp/rmc/boards/qemu-2.8/qemu-2.8.fp b/common/recipes-bsp/rmc/boards/qemu-2.8/qemu-2.8.fp Binary files differnew file mode 100644 index 00000000..7f28f37c --- /dev/null +++ b/common/recipes-bsp/rmc/boards/qemu-2.8/qemu-2.8.fp diff --git a/common/recipes-bsp/rmc/rmc-db.bb b/common/recipes-bsp/rmc/rmc-db.bb new file mode 100644 index 00000000..f24ed11c --- /dev/null +++ b/common/recipes-bsp/rmc/rmc-db.bb @@ -0,0 +1,49 @@ +SUMMARY = "Central RMC Database" +DESCRIPTION = "Generate a centralized RMC database for RMC feature. \ +Fingerprints and data for all boards supported are specified by variable \ +RMC_BOARD_DATA_DIRS which is a list of top directories that contains \ +subdirectories for boards. Developers can add their top directories by appending \ +them to this variable in a rmc-db.bbappend.Refer to rmc-db bbclass for more \ +information." + +LICENSE = "MIT" + +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +S = "${WORKDIR}" + +inherit rmc-db + +RMC_BOARD_DATA_DIRS ?= "${THISDIR}/boards/" +RMC_DB_DIR = "${WORKDIR}/db" + +# Let sstate be aware of change in any added board directories +do_generate_rmc_db[file-checksums] = "${@get_rmc_top_dirs_list(d)}" + +# derived from get_lic_checksum_file_list(d) in base.bbclass in OE +def get_rmc_top_dirs_list(d): + dirlist = [] + dirs = d.getVar("RMC_BOARD_DATA_DIRS", True) or '' + topdirs = dirs.split() + for each in topdirs: + dirlist.append(each + ":" + str(os.path.exists(each))) + return " ".join(dirlist) + +do_generate_rmc_db () { + rmc_generate_db "${RMC_BOARD_DATA_DIRS}" "${RMC_DB_DIR}"/rmc.db +} + +addtask generate_rmc_db after do_compile + +inherit deploy + +do_deploy () { + if [ -f ${RMC_DB_DIR}/rmc.db ]; then + install -m 0400 ${RMC_DB_DIR}/rmc.db ${DEPLOYDIR} + else + rm -f ${DEPLOYDIR}/rmc.db + echo "Warning: no RMC central database found, skip deployment." + fi +} + +addtask deploy after do_generate_rmc_db diff --git a/common/recipes-bsp/rmc/rmc-efi.bb b/common/recipes-bsp/rmc/rmc-efi.bb new file mode 100644 index 00000000..2a1c9a98 --- /dev/null +++ b/common/recipes-bsp/rmc/rmc-efi.bb @@ -0,0 +1,40 @@ +SUMMARY = "RMC (Runtime Machine Configuration) EFI library" + +DESCRIPTION = "The RMC EFI library adds RMC support to existing EFI bootloaders" + +LICENSE = "MIT" + +LIC_FILES_CHKSUM = "file://COPYING;md5=ade413c694d3aaefc9554b24a8814ee8" + +SRC_URI = "git://git.yoctoproject.org/rmc" + +SRCREV = "027ac76f642dcab1a9f237a00f03a3a714bd04b9" + +S = "${WORKDIR}/git" + +COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux*" + +TARGET_CFLAGS +="-Wl,--hash-style=both" + +EXTRA_OEMAKE = "RMC_INSTALL_PREFIX=${D}/${prefix} \ + RMC_INSTALL_LIB_PATH=${D}${libdir} \ + RMC_INSTALL_HEADER_PATH=${D}${includedir}/rmc" + +SECURITY_CFLAGS_remove_class-target = "-fstack-protector-strong" +SECURITY_CFLAGS_append_class-target = " -fno-stack-protector" + +python () { + ccargs = d.getVar('TUNE_CCARGS').split() + if '-mx32' in ccargs: + ccargs.remove('-mx32') + ccargs.append('-m64') + d.setVar('TUNE_CCARGS', ' '.join(ccargs)) +} + +do_compile() { + oe_runmake -f Makefile.efi +} + +do_install() { + oe_runmake -f Makefile.efi install +} diff --git a/common/recipes-bsp/rmc/rmc.bb b/common/recipes-bsp/rmc/rmc.bb new file mode 100644 index 00000000..8797644b --- /dev/null +++ b/common/recipes-bsp/rmc/rmc.bb @@ -0,0 +1,46 @@ +SUMMARY = "RMC (Runtime Machine Configuration)" + +DESCRIPTION = "RMC project provides a tool and libraries to identify types \ +of hardware boards and access any file-based data specific to the board's \ +type at runtime in a centralized way. Software (clients) can have a generic \ +logic to query board-specific data from RMC without knowing the type of board. \ +This make it possible to have a generic software work running on boards which \ +require any quirks or customizations at a board or product level. \ +" + +LICENSE = "MIT" + +LIC_FILES_CHKSUM = "file://COPYING;md5=ade413c694d3aaefc9554b24a8814ee8" + +SRC_URI = "git://git.yoctoproject.org/rmc" + +SRCREV = "027ac76f642dcab1a9f237a00f03a3a714bd04b9" + +S = "${WORKDIR}/git" + +COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux*" + +TARGET_CFLAGS +="-Wl,--hash-style=both" + +EXTRA_OEMAKE = "RMC_INSTALL_PREFIX=${D}/${prefix} \ + RMC_INSTALL_BIN_PATH=${D}${bindir} \ + RMC_INSTALL_LIB_PATH=${D}${libdir} \ + RMC_INSTALL_HEADER_PATH=${D}${includedir}/rmc" + +SECURITY_CFLAGS_remove_class-target = "-fstack-protector-strong" +SECURITY_CFLAGS_append_class-target = " -fno-stack-protector" + +do_compile_class-target() { + oe_runmake +} + +do_install() { + oe_runmake install +} + +do_install_class-native() { + install -d ${D}${STAGING_BINDIR_NATIVE} + install -m 0755 ${S}/src/rmc ${D}${STAGING_BINDIR_NATIVE} +} + +BBCLASSEXTEND = "native" diff --git a/common/recipes-bsp/systemd-boot/systemd-boot/0001-efi-boot.c-workaround-for-Joule-BIOS-hang.patch b/common/recipes-bsp/systemd-boot/systemd-boot/0001-efi-boot.c-workaround-for-Joule-BIOS-hang.patch new file mode 100644 index 00000000..8d0b6149 --- /dev/null +++ b/common/recipes-bsp/systemd-boot/systemd-boot/0001-efi-boot.c-workaround-for-Joule-BIOS-hang.patch @@ -0,0 +1,31 @@ +From 58669ad764767afea4de53f8a97357773b1855ef Mon Sep 17 00:00:00 2001 +From: Saul Wold <sgw@linux.intel.com> +Date: Tue, 25 Oct 2016 12:54:08 -0700 +Subject: [PATCH] efi/boot.c: workaround for Joule BIOS hang + +This patch should be removed when the BIOS is fixed + +Authored-by: Steve Sakoman <steve@sakoman.com> + +Upstream-Status: Inappropriate [machine specific workaround] +Signed-off-by: Saul Wold <sgw@linux.intel.com> +--- + src/boot/efi/boot.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c +index 3dcd9a5..3c6ed8c 100644 +--- a/src/boot/efi/boot.c ++++ b/src/boot/efi/boot.c +@@ -649,7 +649,7 @@ static BOOLEAN menu_run(Config *config, ConfigEntry **chosen_entry, CHAR16 *load + } + + /* timeout disabled, wait for next key */ +- wait = TRUE; ++ wait = FALSE; + continue; + } + +-- +2.7.4 + diff --git a/common/recipes-bsp/systemd-boot/systemd-boot/0001-sd-boot-Link-RMC-library-into-bootloader-and-stub.patch b/common/recipes-bsp/systemd-boot/systemd-boot/0001-sd-boot-Link-RMC-library-into-bootloader-and-stub.patch new file mode 100644 index 00000000..2f248e21 --- /dev/null +++ b/common/recipes-bsp/systemd-boot/systemd-boot/0001-sd-boot-Link-RMC-library-into-bootloader-and-stub.patch @@ -0,0 +1,39 @@ +From fe1c2fdfe81f2ac2b41fe8543ba07f1911770d26 Mon Sep 17 00:00:00 2001 +From: Jianxun Zhang <jianxun.zhang@linux.intel.com> +Date: Sat, 21 May 2016 18:52:07 -0700 +Subject: [PATCH] sd-boot: Link RMC library into bootloader and stub + +Add RMC library into bootloader binary and stub. + +Upstream-Status: Pending + +Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com> +--- + Makefile.am | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 305099ab6..9fb6f9b7b 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -2802,7 +2802,7 @@ $(top_builddir)/src/boot/efi/%.o: $(top_srcdir)/src/boot/efi/%.c $(addprefix $(t + + $(systemd_boot_solib): $(systemd_boot_objects) + $(AM_V_CCLD)$(LD) $(efi_ldflags) $(systemd_boot_objects) \ +- -o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name); \ ++ -o $@ -lefi -lgnuefi -lrmcefi $(shell $(CC) -print-libgcc-file-name); \ + nm -D -u $@ | grep ' U ' && exit 1 || : + + $(systemd_boot): $(systemd_boot_solib) +@@ -2852,7 +2852,7 @@ $(top_builddir)/src/boot/efi/%.o: $(top_srcdir)/src/boot/efi/%.c $(addprefix $(t + + $(stub_solib): $(stub_objects) + $(AM_V_CCLD)$(LD) $(efi_ldflags) $(stub_objects) \ +- -o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name); \ ++ -o $@ -lefi -lgnuefi -lrmcefi $(shell $(CC) -print-libgcc-file-name); \ + nm -D -u $@ | grep ' U ' && exit 1 || : + + $(stub): $(stub_solib) +-- +2.11.0 + diff --git a/common/recipes-bsp/systemd-boot/systemd-boot/0001-sd-boot-stub-check-LoadOptions-contains-data.patch b/common/recipes-bsp/systemd-boot/systemd-boot/0001-sd-boot-stub-check-LoadOptions-contains-data.patch new file mode 100644 index 00000000..69acc8f8 --- /dev/null +++ b/common/recipes-bsp/systemd-boot/systemd-boot/0001-sd-boot-stub-check-LoadOptions-contains-data.patch @@ -0,0 +1,42 @@ +From 87cd5a5e0f06ceb7f9dbdcc4029e0c279a38e6ad Mon Sep 17 00:00:00 2001 +From: Mikko Ylinen <mikko.ylinen@linux.intel.com> +Date: Mon, 27 Feb 2017 10:04:03 +0200 +Subject: [PATCH] sd-boot: stub: check LoadOptions contains data + +With some UEFI shells LoadOptionsSize is reported being > 0 +but the corresponding LoadOptions does not contain any data +(the first element has value 0). + +When that happens, the stub feature that allows .cmdline to be +replaced by what's in LoadOptions ends up copying nothing/random +data to the kernel cmdline resulting in different kinds of boot +problems. + +To fix this, add a check to see if LoadOptions contains data +before replacing the .cmdline. + +Upstream-Status: Accepted [https://github.com/systemd/systemd/pull/5467] + +Fixes [YOCTO #11078]. + +Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com> +--- + src/boot/efi/stub.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/boot/efi/stub.c b/src/boot/efi/stub.c +index 7c1ffb1bc..b7d5d3cda 100644 +--- a/src/boot/efi/stub.c ++++ b/src/boot/efi/stub.c +@@ -87,7 +87,7 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { + cmdline_len = szs[0]; + + /* if we are not in secure boot mode, accept a custom command line and replace the built-in one */ +- if (!secure && loaded_image->LoadOptionsSize > 0) { ++ if (!secure && loaded_image->LoadOptionsSize > 0 && *(CHAR16 *)loaded_image->LoadOptions != 0) { + CHAR16 *options; + CHAR8 *line; + UINTN i; +-- +2.11.0 + diff --git a/common/recipes-bsp/systemd-boot/systemd-boot/0002-sd-boot-Load-board-specific-boot-entries-from-RMC-da.patch b/common/recipes-bsp/systemd-boot/systemd-boot/0002-sd-boot-Load-board-specific-boot-entries-from-RMC-da.patch new file mode 100644 index 00000000..e88012c3 --- /dev/null +++ b/common/recipes-bsp/systemd-boot/systemd-boot/0002-sd-boot-Load-board-specific-boot-entries-from-RMC-da.patch @@ -0,0 +1,250 @@ +From a3c4fc8c2847fe289a617bcba1d905f580f0e18d Mon Sep 17 00:00:00 2001 +From: Jianxun Zhang <jianxun.zhang@linux.intel.com> +Date: Wed, 1 Jun 2016 16:32:22 -0700 +Subject: [PATCH 2/3] sd-boot: Load board-specific boot entries from RMC + database + +RMC provides a centralized database file on ESP. The DB contains +fingerprints and any file blobs associated to physical boards. +Callers can fetch board-specific data with fingerprint info +collected from board at runtime if there is any record matched +board's fingerprint. + +To let bootloader know which file blob in RMC should be queried, +a special config file BOOTENTRY.CONFIG is defined as: + +boot.conf +install.conf + +Bootloader calls RMC APIs and other functions to perform these +tasks before it shows boot menu to user: + +(1) Load RMC database file from ESP +(2) Collect fingerprint data from board +(3) Query BOOTENTRY.CONFIG from RMC DB with fingerprint +(4) Parse BOOTENTRY.CONFIG to know names of boot entry files +(5) Query boot entry files one by one from RMC DB, and add + them into sd-boot config data. + +The final effect is that bootloader will show board-specific +boot entries in boot menu to user. User then can choose one +of them to boot system with the selected configuration. + +If any of these steps fails, bootloader simply skips loading +RMC configs or any entry file not successfully fetched from +RMC DB. Once any entry is loaded successfully from RMC DB, +bootloader skips loading any boot entries from ESP. + +Upstream-Status: Pending + +Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com> +--- + src/boot/efi/boot.c | 147 +++++++++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 145 insertions(+), 2 deletions(-) + +diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c +index 30c1ead..d1b029b 100644 +--- a/src/boot/efi/boot.c ++++ b/src/boot/efi/boot.c +@@ -15,6 +15,7 @@ + + #include <efi.h> + #include <efilib.h> ++#include <rmc_api.h> + + #include "console.h" + #include "disk.h" +@@ -33,6 +34,9 @@ static const char __attribute__((used)) magic[] = "#### LoaderInfo: systemd-boot + + static const EFI_GUID global_guid = EFI_GLOBAL_VARIABLE; + ++static CHAR8* rmc_db; ++static rmc_fingerprint_t *rmc_fp; ++ + enum loader_type { + LOADER_UNDEFINED, + LOADER_EFI, +@@ -1702,6 +1706,136 @@ static VOID config_free(Config *config) { + FreePool(config->entry_oneshot); + } + ++/* Derived from line_get_key_value(), we could consolidate two functions later */ ++static CHAR8 *get_line(CHAR8 *content, UINT64 *pos) { ++ CHAR8 *line; ++ UINT64 linelen; ++ ++skip: ++ line = content + *pos; ++ if (*line == '\0') ++ return NULL; ++ ++ linelen = 0; ++ while (line[linelen] && !strchra((CHAR8 *)"\n\r", line[linelen])) ++ linelen++; ++ ++ /* move pos to next line */ ++ *pos += linelen; ++ if (content[*pos]) ++ (*pos)++; ++ ++ /* empty line */ ++ if (linelen == 0) ++ goto skip; ++ ++ /* terminate line */ ++ line[linelen] = '\0'; ++ ++ /* remove leading whitespace */ ++ while (strchra((CHAR8 *)" \t", *line)) { ++ line++; ++ linelen--; ++ } ++ ++ /* remove trailing whitespace */ ++ while (linelen > 0 && strchra((CHAR8 *)" \t", line[linelen-1])) ++ linelen--; ++ line[linelen] = '\0'; ++ ++ if (*line == '#') ++ goto skip; ++ ++ return line; ++} ++ ++/* load rmc database file from ESP and try to get fingerprint. These ++ * are essential information indicating we could query rmc data for ++ * this board at least ++ * return 0 if both database file and fingerprint can be obtained, otherwise ++ * non-zero value is returned. ++ * ++ * Note: db and fp hold valid values only when this function returns 0. ++ * Caller is responsible to free allocated memory pointed by *db and *fp when ++ * this function returns 0. ++ */ ++ ++static UINTN rmc_initialize(EFI_FILE *root_dir, EFI_SYSTEM_TABLE *sys_table, CHAR8 **db, rmc_fingerprint_t **fp) { ++ UINTN len; ++ UINTN ret = 1; ++ ++ if (!db || !fp) ++ return ret; ++ ++ *db = NULL; ++ *fp = NULL; ++ ++ /* load rmc database */ ++ len = file_read(root_dir, L"\\rmc.db", 0, 0, db); ++ ++ if (len <= 0) ++ goto done; ++ ++ *fp = AllocateZeroPool(sizeof(rmc_fingerprint_t)); ++ /* call rmc to get fingerprint. We will use single-action rmc APIs to query multiple files. ++ * This should bring a better performance than calling double-action rmc API every time. ++ */ ++ if (rmc_get_fingerprint(sys_table, *fp)) ++ goto done; ++ ++ ret = 0; ++done: ++ if (ret) { ++ FreePool(*db); ++ FreePool(*fp); ++ } ++ ++ return ret; ++} ++ ++/* load RMC entries ++ * return TRUE when at least one entry is loaded, otherwise, return FALSE ++ */ ++static BOOLEAN config_load_rmc_entries(Config *config, EFI_HANDLE *device, CHAR16 *loaded_image_path, CHAR8 *db, rmc_fingerprint_t *fp) { ++ CHAR8 *boot_entry = NULL; ++ CHAR8 *boot_config = NULL; ++ rmc_file_t rp; ++ CHAR8 *line; ++ UINT64 pos = 0; ++ BOOLEAN ret = FALSE; ++ ++ if (!db || !fp) ++ return ret; ++ ++ /* query boot entry config file */ ++ if (rmc_query_file_by_fp(fp, db, "BOOTENTRY.CONFIG", &rp)) ++ return ret; ++ ++ /* file blob read from rmc db is not necessarily null-terminated, and we ++ * should keep mem where rmc db lives from change during parsing ++ */ ++ boot_config = AllocatePool(rp.blob_len * sizeof(CHAR8) + 1); ++ CopyMem(boot_config, rp.blob, rp.blob_len); ++ boot_config[rp.blob_len] = '\0'; ++ /* parse boot entry config */ ++ while ((line = get_line(boot_config, &pos))) { ++ if (rmc_query_file_by_fp(fp, db, (char *)line, &rp)) ++ continue; ++ if (rp.blob_len > 0) { ++ boot_entry = AllocatePool(rp.blob_len * sizeof(CHAR8) + 1); ++ CopyMem(boot_entry, rp.blob, rp.blob_len); ++ boot_entry[rp.blob_len] = '\0'; ++ config_entry_add_from_file(config, device, ++ stra_to_str(line), boot_entry, ++ loaded_image_path); ++ /* tell caller success when a RMC entry is loaded */ ++ ret = TRUE; ++ } ++ } ++ ++ return ret; ++} ++ + EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { + CHAR16 *s; + CHAR8 *b; +@@ -1714,6 +1848,7 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { + UINT64 init_usec; + BOOLEAN menu = FALSE; + CHAR16 uuid[37]; ++ BOOLEAN rmc_entry = FALSE; + + InitializeLib(image, sys_table); + init_usec = time_usec(); +@@ -1745,6 +1880,8 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { + return EFI_LOAD_ERROR; + } + ++ /* Initialize rmc before loading any config */ ++ rmc_initialize(root_dir, sys_table, &rmc_db, &rmc_fp); + + /* the filesystem path to this image, to prevent adding ourselves to the menu */ + loaded_image_path = DevicePathToStr(loaded_image->FilePath); +@@ -1753,11 +1890,15 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { + ZeroMem(&config, sizeof(Config)); + config_load_defaults(&config, root_dir); + ++ if (rmc_db && rmc_fp) ++ rmc_entry = config_load_rmc_entries(&config, loaded_image->DeviceHandle, loaded_image_path, rmc_db, rmc_fp); ++ + /* scan /EFI/Linux/ directory */ + config_entry_add_linux(&config, loaded_image, root_dir); + +- /* scan /loader/entries/\*.conf files */ +- config_load_entries(&config, loaded_image->DeviceHandle, root_dir, loaded_image_path); ++ /* scan /loader/entries/\*.conf files only when no RMC entry is loaded */ ++ if (rmc_entry == FALSE) ++ config_load_entries(&config, loaded_image->DeviceHandle, root_dir, loaded_image_path); + + /* sort entries after version number */ + config_sort_entries(&config); +@@ -1851,6 +1992,8 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { + out: + FreePool(loaded_image_path); + config_free(&config); ++ FreePool(rmc_db); ++ FreePool(rmc_fp); + uefi_call_wrapper(root_dir->Close, 1, root_dir); + uefi_call_wrapper(BS->CloseProtocol, 4, image, &LoadedImageProtocol, image, NULL); + return err; +-- +2.7.4 + diff --git a/common/recipes-bsp/systemd-boot/systemd-boot/0003-sd-boot-Support-global-kernel-command-line-fragment.patch b/common/recipes-bsp/systemd-boot/systemd-boot/0003-sd-boot-Support-global-kernel-command-line-fragment.patch new file mode 100644 index 00000000..a4b63557 --- /dev/null +++ b/common/recipes-bsp/systemd-boot/systemd-boot/0003-sd-boot-Support-global-kernel-command-line-fragment.patch @@ -0,0 +1,66 @@ +From 1e33f99e13a70c19c1f63f6ef1c5522a09adece6 Mon Sep 17 00:00:00 2001 +From: Jianxun Zhang <jianxun.zhang@linux.intel.com> +Date: Mon, 20 Jun 2016 13:08:20 -0700 +Subject: [PATCH 3/3] sd-boot: Support global kernel command line fragment + +Query file blob KBOOTPARAM from RMC. If it exists, we append +it to the new linux boot entry's cmdline. A boot entry could +be read from a .conf file on ESP, RMC database, or embedded +linux image. content in KBOOTPARAM is effective in all of +these cases. + +Upstream-Status: Pending + +Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com> +--- + src/boot/efi/boot.c | 34 ++++++++++++++++++++++++++++++++++ + 1 file changed, 34 insertions(+) + +diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c +index d1b029b..8dffc48 100644 +--- a/src/boot/efi/boot.c ++++ b/src/boot/efi/boot.c +@@ -846,6 +846,40 @@ static VOID config_add_entry(Config *config, ConfigEntry *entry) { + config->entries = ReallocatePool(config->entries, + sizeof(VOID *) * config->entry_count, sizeof(VOID *) * i); + } ++ ++ /* rmc: a linux entry could be added from .conf file or an embedded linux image ++ * we put appending global command line here to cover both of two cases. ++ */ ++ if (entry->type == LOADER_LINUX && rmc_db && rmc_fp) { ++ rmc_file_t rmc_kp; ++ ++ if (!rmc_query_file_by_fp(rmc_fp, rmc_db, "KBOOTPARAM", &rmc_kp)) { ++ CHAR8 *cmdline; ++ CHAR16 *s; ++ CHAR16 *t; ++ CHAR16 *p; ++ ++ cmdline = AllocatePool(rmc_kp.blob_len * sizeof(CHAR8) + 1); ++ CopyMem(cmdline, rmc_kp.blob, rmc_kp.blob_len); ++ cmdline[rmc_kp.blob_len] = '\0'; ++ p = stra_to_str(cmdline); ++ t = p; ++ ++ while (*t) { ++ if (*t == '\n') ++ *t = '\0'; ++ t++; ++ } ++ ++ s = PoolPrint(L"%s %s", entry->options, p); ++ FreePool(entry->options); ++ FreePool(p); ++ FreePool(cmdline); ++ ++ entry->options = s; ++ } ++ } ++ + config->entries[config->entry_count++] = entry; + } + +-- +2.7.4 + diff --git a/common/recipes-bsp/systemd-boot/systemd-boot/0004-sd-boot-Support-global-kernel-command-line-fragment-in-EFI-stub.patch b/common/recipes-bsp/systemd-boot/systemd-boot/0004-sd-boot-Support-global-kernel-command-line-fragment-in-EFI-stub.patch new file mode 100644 index 00000000..75082693 --- /dev/null +++ b/common/recipes-bsp/systemd-boot/systemd-boot/0004-sd-boot-Support-global-kernel-command-line-fragment-in-EFI-stub.patch @@ -0,0 +1,81 @@ +From 4cb9c65ea9c0eba3ba04d036dccd4a5ab3d2547b Mon Sep 17 00:00:00 2001 +From: Mikko Ylinen <mikko.ylinen@intel.com> +Date: Fri, 27 Jan 2017 13:31:45 +0200 +Subject: [PATCH] sd-boot: support global kernel command line in EFI stub + +This change integrates rmc into EFI stub and supports a +global fragment (RMC KBOOTPARAM) that is appended to the +cmdline at boot. + +The fragment is board-specific and read from the database. + +Implements [YOCTO #10924]. + +Upstream-status: Pending + +Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com> +--- + src/boot/efi/stub.c | 33 +++++++++++++++++++++++++++++++++ + 1 file changed, 33 insertions(+) + +diff --git a/src/boot/efi/stub.c b/src/boot/efi/stub.c +index 1e250f34f..f3865199f 100644 +--- a/src/boot/efi/stub.c ++++ b/src/boot/efi/stub.c +@@ -13,6 +13,7 @@ + + #include <efi.h> + #include <efilib.h> ++#include <rmc_api.h> + + #include "disk.h" + #include "graphics.h" +@@ -48,6 +49,9 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { + UINTN cmdline_len; + CHAR16 uuid[37]; + EFI_STATUS err; ++ INTN len; ++ CHAR8 *rmc_db = NULL; ++ rmc_file_t rmc_file; + + InitializeLib(image, sys_table); + +@@ -112,6 +116,35 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { + #endif + } + ++ len = file_read(root_dir, L"\\rmc.db", 0, 0, &rmc_db); ++ if (len <= 0) ++ rmc_db = NULL; ++ ++ /* If the board has a fragment in rmc database, append it to the cmdline */ ++ if (rmc_db && !rmc_gimme_file(sys_table, rmc_db, "KBOOTPARAM", &rmc_file)) { ++ CHAR8 *line; ++ UINTN i = 0; ++ UINTN j; ++ ++ line = AllocatePool(rmc_file.blob_len + cmdline_len + 2); ++ ++ while (i < cmdline_len && cmdline[i] != '\0') { ++ line[i] = cmdline[i]; ++ i++; ++ } ++ ++ line[i++] = ' '; ++ ++ for (j=0; j < rmc_file.blob_len; j++) ++ line[i+j] = rmc_file.blob[j]; ++ line[i+j] = '\0'; ++ ++ cmdline = line; ++ cmdline_len = i + j; ++ ++ FreePool(rmc_db); ++ } ++ + /* export the device path this image is started from */ + if (disk_get_part_uuid(loaded_image->DeviceHandle, uuid) == EFI_SUCCESS) + efivar_set(L"LoaderDevicePartUUID", uuid, FALSE); +-- +2.11.0 + diff --git a/common/recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc b/common/recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc new file mode 100644 index 00000000..1172d53d --- /dev/null +++ b/common/recipes-bsp/systemd-boot/systemd-boot/rmc-boot.inc @@ -0,0 +1,12 @@ +DEPENDS_append_intel-x86-common = " rmc rmc-efi" + +EXTRA_OEMAKE_append_intel-x86-common = ' EFI_LDFLAGS="-L${STAGING_DIR_HOST}/usr/lib" EFI_CFLAGS="-I${STAGING_INCDIR}/rmc -DRMC_EFI"' + +SRC_URI_append_intel-x86-common = " \ + file://0001-sd-boot-Link-RMC-library-into-bootloader-and-stub.patch \ + file://0002-sd-boot-Load-board-specific-boot-entries-from-RMC-da.patch \ + file://0003-sd-boot-Support-global-kernel-command-line-fragment.patch \ + file://0004-sd-boot-Support-global-kernel-command-line-fragment-in-EFI-stub.patch \ + file://0001-efi-boot.c-workaround-for-Joule-BIOS-hang.patch \ + file://0001-sd-boot-stub-check-LoadOptions-contains-data.patch \ + " diff --git a/common/recipes-bsp/systemd-boot/systemd-boot/systemd-boot.inc b/common/recipes-bsp/systemd-boot/systemd-boot/systemd-boot.inc new file mode 100644 index 00000000..fcce6ce1 --- /dev/null +++ b/common/recipes-bsp/systemd-boot/systemd-boot/systemd-boot.inc @@ -0,0 +1,7 @@ +EXTRA_OEMAKE_append_intel-x86-common = ' EFI_LDFLAGS="-L${STAGING_DIR_HOST}/usr/lib" ' + +SRC_URI_append_intel-x86-common = " \ + file://0001-efi-boot.c-workaround-for-Joule-BIOS-hang.patch \ + file://0001-sd-boot-stub-check-LoadOptions-contains-data.patch \ + " + diff --git a/common/recipes-bsp/systemd-boot/systemd-boot_%.bbappend b/common/recipes-bsp/systemd-boot/systemd-boot_%.bbappend new file mode 100644 index 00000000..557c0493 --- /dev/null +++ b/common/recipes-bsp/systemd-boot/systemd-boot_%.bbappend @@ -0,0 +1,23 @@ +FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/systemd-boot:" + +# Pin systemd revision down for systemd-boot recipe. +# Patches could not be applied cleanly when systemd in OE is updated, +# though we don't expect a lot of changes could happen in bootloader. +# RMC is designed to support a large number of types of boards, so we +# should do explicit update with validation to prevent regression even +# resolving conflicts for a new tip could be done in a short time. + +# Revision: systemd v232 in OE +SRCREV_intel-x86-common = "a1e2ef7ec912902d8142e7cb5830cbfb47dba86c" + +include systemd-boot/${EFI_PROVIDER}.inc + +PACKAGE_ARCH_intel-x86-common = "${INTEL_COMMON_PACKAGE_ARCH}" + +do_compile_append_intel-x86-common() { + oe_runmake linux${SYSTEMD_BOOT_EFI_ARCH}.efi.stub +} + +do_deploy_append_intel-x86-common() { + install ${B}/linux*.efi.stub ${DEPLOYDIR} +} diff --git a/common/recipes-bsp/thermald/thermald_1.6.bb b/common/recipes-bsp/thermald/thermald_1.6.bb new file mode 100644 index 00000000..e6cbb621 --- /dev/null +++ b/common/recipes-bsp/thermald/thermald_1.6.bb @@ -0,0 +1,33 @@ +SUMMARY = "Linux thermal daemon" + +DESCRIPTION = "Thermal Daemon is a Linux daemon used to prevent the \ +overheating of platforms. This daemon monitors temperature and applies \ +compensation using available cooling methods." + +HOMEPAGE = "https://github.com/01org/thermal_daemon" + +DEPENDS = "dbus dbus-glib dbus-glib-native libxml2 glib-2.0 glib-2.0-native" +DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd','',d)}" +DEPENDS_append_libc-musl = " argp-standalone" +DEPENDS_append_toolchain-clang = " openmp" +LICENSE = "GPL-2.0" +LIC_FILES_CHKSUM = "file://COPYING;md5=ea8831610e926e2e469075b52bf08848" + +SRC_URI = "git://github.com/intel/thermal_daemon/" +SRCREV = "5f1be4d9d6f3b27d2c9884f833ca05cdcb4428e0" +S = "${WORKDIR}/git" + +inherit pkgconfig autotools systemd + +FILES_${PN} += "${datadir}/dbus-1/system-services/*.service" + +SYSTEMD_SERVICE_${PN} = "thermald.service" + +COMPATIBLE_HOST = '(i.86|x86_64).*-linux' + +CONFFILES_${PN} = " \ + ${sysconfdir}/thermald/thermal-conf.xml \ + ${sysconfdir}/thermald/thermal-cpu-cdev-order.xml \ + " + +UPSTREAM_CHECK_URI = "https://github.com/01org/thermal_daemon/releases" diff --git a/common/recipes-core/images/core-image-minimal-initramfs.bbappend b/common/recipes-core/images/core-image-minimal-initramfs.bbappend new file mode 100644 index 00000000..4ddca375 --- /dev/null +++ b/common/recipes-core/images/core-image-minimal-initramfs.bbappend @@ -0,0 +1,6 @@ +# Use initramfs-framework instead of initramfs-live* +PACKAGE_INSTALL_remove_intel-x86-common = "initramfs-live-boot initramfs-live-install initramfs-live-install-efi" +PACKAGE_INSTALL_append_intel-x86-common = " initramfs-framework-base initramfs-module-udev initramfs-module-setup-live initramfs-module-install-efi" + +# Add i915 graphics firmware +PACKAGE_INSTALL_append_intel-x86-common = " linux-firmware-i915" diff --git a/common/recipes-core/images/core-image-tiny.bb b/common/recipes-core/images/core-image-tiny.bb new file mode 100644 index 00000000..ed39fd77 --- /dev/null +++ b/common/recipes-core/images/core-image-tiny.bb @@ -0,0 +1,37 @@ +SUMMARY = "A tiny image just capable of allowing a device to boot from RAM, \ +this image recipe generates an image file which rather boots from initrd than \ +from storage, it achieves this by using wic to pick up the artifacts generated \ +by the core-image-tiny-initramfs image" + +# The actual rootfs/initrd will be the one from core-image-tiny-initramfs, so +# we reset IMAGE_INSTALL to avoid building other things that will be pointless +IMAGE_INSTALL = "" + +# Do not pollute the initrd image with rootfs features +IMAGE_FEATURES = "" + +IMAGE_LINGUAS = " " + +LICENSE = "MIT" + +IMAGE_ROOTFS_SIZE ?= "8192" + +IMAGE_FSTYPES = "wic" +inherit core-image + +# We get some parts from image-live that we need in order to boot from initrd +INITRD_IMAGE_LIVE ?= "core-image-tiny-initramfs" + +python() { + image_b = d.getVar('IMAGE_BASENAME') + initrd_i = d.getVar('INITRD_IMAGE_LIVE') + if image_b == initrd_i: + bb.error('INITRD_IMAGE_LIVE %s cannot use the requested IMAGE_FSTYPE' % initrd_i) + bb.fatal('Check IMAGE_FSTYPES and INITRAMFS_FSTYPES settings.') + elif initrd_i: + d.appendVarFlag('do_image', 'depends', ' %s:do_image_complete' % initrd_i) +} + +WKS_FILE_intel-corei7-64 = "core-image-tiny.wks.in" +WKS_FILE_intel-core2-32 = "core-image-tiny.wks.in" +WKS_FILE_intel-quark = "mktinygalileodisk.wks" diff --git a/common/recipes-core/initrdscripts/files/intel-x86-common/init-install-efi.sh b/common/recipes-core/initrdscripts/files/intel-x86-common/init-install-efi.sh new file mode 100644 index 00000000..a7a2ad4c --- /dev/null +++ b/common/recipes-core/initrdscripts/files/intel-x86-common/init-install-efi.sh @@ -0,0 +1,342 @@ +#!/bin/sh -e +# +# Copyright (c) 2016, Intel Corporation. +# All rights reserved. +# +# install.sh [device_name] [rootfs_name] +# +# This file is a copy of file with same name in OE: +# meta/recipes-core/initrdscripts/files/. We modify +# it for RMC feature to deploy file blobs from RMC +# database file to target. + +PATH=/sbin:/bin:/usr/sbin:/usr/bin + +# We need 20 Mb for the boot partition +boot_size=20 + +# 5% for swap +swap_ratio=5 + +# Get a list of hard drives +hdnamelist="" +live_dev_name=`cat /proc/mounts | grep ${1%/} | awk '{print $1}'` +live_dev_name=${live_dev_name#\/dev/} +# Only strip the digit identifier if the device is not an mmc +case $live_dev_name in + mmcblk*) + ;; + nvme*) + ;; + *) + live_dev_name=${live_dev_name%%[0-9]*} + ;; +esac + +echo "Searching for hard drives ..." + +for device in `ls /sys/block/`; do + case $device in + loop*) + # skip loop device + ;; + sr*) + # skip CDROM device + ;; + ram*) + # skip ram device + ;; + *) + # skip the device LiveOS is on + # Add valid hard drive name to the list + case $device in + $live_dev_name*) + # skip the device we are running from + ;; + *) + hdnamelist="$hdnamelist $device" + ;; + esac + ;; + esac +done + +if [ -z "${hdnamelist}" ]; then + echo "You need another device (besides the live device /dev/${live_dev_name}) to install the image. Installation aborted." + exit 1 +fi + +TARGET_DEVICE_NAME="" +for hdname in $hdnamelist; do + # Display found hard drives and their basic info + echo "-------------------------------" + echo /dev/$hdname + if [ -r /sys/block/$hdname/device/vendor ]; then + echo -n "VENDOR=" + cat /sys/block/$hdname/device/vendor + fi + if [ -r /sys/block/$hdname/device/model ]; then + echo -n "MODEL=" + cat /sys/block/$hdname/device/model + fi + if [ -r /sys/block/$hdname/device/uevent ]; then + echo -n "UEVENT=" + cat /sys/block/$hdname/device/uevent + fi + echo +done + +# Get user choice +while true; do + echo "Please select an install target or press n to exit ($hdnamelist ): " + read answer + if [ "$answer" = "n" ]; then + echo "Installation manually aborted." + exit 1 + fi + for hdname in $hdnamelist; do + if [ "$answer" = "$hdname" ]; then + TARGET_DEVICE_NAME=$answer + break + fi + done + if [ -n "$TARGET_DEVICE_NAME" ]; then + break + fi +done + +if [ -n "$TARGET_DEVICE_NAME" ]; then + echo "Installing image on /dev/$TARGET_DEVICE_NAME ..." +else + echo "No hard drive selected. Installation aborted." + exit 1 +fi + +device=/dev/$TARGET_DEVICE_NAME + +# +# The udev automounter can cause pain here, kill it +# +rm -f /etc/udev/rules.d/automount.rules +rm -f /etc/udev/scripts/mount* + +# +# Unmount anything the automounter had mounted +# +umount ${device}* 2> /dev/null || /bin/true + +mkdir -p /tmp + +# Create /etc/mtab if not present +if [ ! -e /etc/mtab ]; then + cat /proc/mounts > /etc/mtab +fi + +disk_size=$(parted ${device} unit mb print | grep '^Disk .*: .*MB' | cut -d" " -f 3 | sed -e "s/MB//") + +swap_size=$((disk_size*swap_ratio/100)) +rootfs_size=$((disk_size-boot_size-swap_size)) + +rootfs_start=$((boot_size)) +rootfs_end=$((rootfs_start+rootfs_size)) +swap_start=$((rootfs_end)) + +# MMC devices are special in a couple of ways +# 1) they use a partition prefix character 'p' +# 2) they are detected asynchronously (need rootwait) +rootwait="" +part_prefix="" +if [ ! "${device#/dev/mmcblk}" = "${device}" ] || \ +[ ! "${device#/dev/nvme}" = "${device}" ]; then + part_prefix="p" + rootwait="rootwait" +fi +bootfs=${device}${part_prefix}1 +rootfs=${device}${part_prefix}2 +swap=${device}${part_prefix}3 + +echo "*****************" +echo "Boot partition size: $boot_size MB ($bootfs)" +echo "Rootfs partition size: $rootfs_size MB ($rootfs)" +echo "Swap partition size: $swap_size MB ($swap)" +echo "*****************" +echo "Deleting partition table on ${device} ..." +dd if=/dev/zero of=${device} bs=512 count=35 + +echo "Creating new partition table on ${device} ..." +parted ${device} mklabel gpt + +echo "Creating boot partition on $bootfs" +parted ${device} mkpart boot fat32 0% $boot_size +parted ${device} set 1 boot on + +echo "Creating rootfs partition on $rootfs" +parted ${device} mkpart root ext3 $rootfs_start $rootfs_end + +echo "Creating swap partition on $swap" +parted ${device} mkpart swap linux-swap $swap_start 100% + +parted ${device} print + +echo "Formatting $bootfs to vfat..." +mkfs.vfat $bootfs + +echo "Formatting $rootfs to ext3..." +mkfs.ext3 $rootfs + +echo "Formatting swap partition...($swap)" +mkswap $swap + +mkdir /tgt_root +mkdir /src_root +mkdir -p /boot + +# Handling of the target root partition +mount $rootfs /tgt_root +mount -o rw,loop,noatime,nodiratime /run/media/$1/$2 /src_root +echo "Copying rootfs files..." +cp -a /src_root/* /tgt_root +if [ -d /tgt_root/etc/ ] ; then + boot_uuid=$(blkid -o value -s UUID ${bootfs}) + swap_part_uuid=$(blkid -o value -s PARTUUID ${swap}) + echo "/dev/disk/by-partuuid/$swap_part_uuid swap swap defaults 0 0" >> /tgt_root/etc/fstab + echo "UUID=$boot_uuid /boot vfat defaults 1 2" >> /tgt_root/etc/fstab + # We dont want udev to mount our root device while we're booting... + if [ -d /tgt_root/etc/udev/ ] ; then + echo "${device}" >> /tgt_root/etc/udev/mount.blacklist + fi +fi + +# Handling of the target boot partition +mount $bootfs /boot +echo "Preparing boot partition..." + +EFIDIR="/boot/EFI/BOOT" +mkdir -p $EFIDIR +# Copy the efi loader +cp /run/media/$1/EFI/BOOT/*.efi $EFIDIR + +# RMC deployment +RMC_CMD=/src_root/usr/bin/rmc +RMC_DB=/run/media/$1/rmc.db + +# We don't want to quit when a step failed. For example, +# a file system could not support some operations. +set +e + +if [ -f "${RMC_DB}" ] && [ -f "${RMC_CMD}" ]; then + echo "Found RMC database and tool, start RMC deployment" + # query INSTALLER.CONFIG from RMC DB + if ${RMC_CMD} -B INSTALLER.CONFIG -d "${RMC_DB}" -o /tmp/installer.config; then + while IFS=':' read -r NAME TGT_UID TGT_GID TGT_MODE TGT_PATH; do + # skip comment + # The regexp in grep works with busybox grep which doesn't + # seem to have a -P to recognize '\t'. But this expression could not + # work with gnu grep... + if echo "$NAME"|grep -q $'^[ \t]*#'; then + continue + fi + # check if we should create a directory (last char in target path is '/') + # or deploy a file + LAST_CHAR=$(echo "${TGT_PATH:$((${#TGT_PATH}-1)):1}") + + # Do not bail out for failures but user should get stderr message + if [ ${LAST_CHAR} = "/" ]; then + # name field is skipped for directory + echo "DIR: ${TGT_UID}:${TGT_GID}:${TGT_MODE} => ${TGT_PATH}" + mkdir -p "$TGT_PATH" + chown "${TGT_UID}:${TGT_GID}" "$TGT_PATH" + chmod "${TGT_MODE}" "$TGT_PATH" + else + ${RMC_CMD} -B "${NAME}" -d "${RMC_DB}" -o "${TGT_PATH}" + echo "FILE: ${NAME}:${TGT_UID}:${TGT_GID}:${TGT_MODE} => ${TGT_PATH}" + chown "${TGT_UID}:${TGT_GID}" "$TGT_PATH" + chmod "${TGT_MODE}" "$TGT_PATH" + fi + done < /tmp/installer.config + rm -rf /tmp/installer.config + + # remove rmc from target since we don't think it is a valid + # case to run rmc after installation. + rm -rf /tgt_root/usr/bin/rmc + echo "RMC deployment finished" + else + echo "INSTALLER.CONFIG is not found, skip RMC deployment" + fi + + # Final retouching by calling post-install hook + if ${RMC_CMD} -B POSTINSTALL.sh -d "${RMC_DB}" -o /tmp/POSTINSTALL.sh; then + echo "Found POSTINSTALL.sh execute it..." + chmod 500 /tmp/POSTINSTALL.sh + /tmp/POSTINSTALL.sh + rm -rf /tmp/POSTINSTALL.sh + fi +fi +set -e + +if [ -f /run/media/$1/EFI/BOOT/grub.cfg ]; then + root_part_uuid=$(blkid -o value -s PARTUUID ${rootfs}) + GRUBCFG="$EFIDIR/grub.cfg" + cp /run/media/$1/EFI/BOOT/grub.cfg $GRUBCFG + # Update grub config for the installed image + # Delete the install entry + sed -i "/menuentry 'install'/,/^}/d" $GRUBCFG + # Delete the initrd lines + sed -i "/initrd /d" $GRUBCFG + # Delete any LABEL= strings + sed -i "s/ LABEL=[^ ]*/ /" $GRUBCFG + # Delete any root= strings + sed -i "s/ root=[^ ]*/ /g" $GRUBCFG + # Add the root= and other standard boot options + sed -i "s@linux /vmlinuz *@linux /vmlinuz root=PARTUUID=$root_part_uuid rw $rootwait quiet @" $GRUBCFG +fi + +if [ -d /run/media/$1/loader ]; then + rootuuid=$(blkid -o value -s PARTUUID ${rootfs}) + GUMMIBOOT_CFGS="/boot/loader/entries/*.conf" + if [ -d /boot/loader ]; then + # Don't override loader.conf RMC already deployed + if [ ! -f /boot/loader/loader.conf ]; then + cp /run/media/$1/loader/loader.conf /boot/loader/ + fi + # only copy built OE entries when RMC entries don't exist. + if [ ! -d /boot/loader/entries ] || [ ! ls /boot/loader/entries/*.conf &>/dev/null ]; then + cp -dr /run/media/$1/loader/entries /boot/loader + fi + else + # copy config files for gummiboot + cp -dr /run/media/$1/loader /boot + # delete the install entry + rm -f /boot/loader/entries/install.conf + fi + # delete the initrd lines + sed -i "/initrd /d" $GUMMIBOOT_CFGS + # delete any LABEL= strings + sed -i "s/ LABEL=[^ ]*/ /" $GUMMIBOOT_CFGS + # delete any root= strings + sed -i "s/ root=[^ ]*/ /" $GUMMIBOOT_CFGS + # add the root= and other standard boot options + sed -i "s@options *@options root=PARTUUID=$rootuuid rw $rootwait quiet @" $GUMMIBOOT_CFGS + # if RMC feature presents, append global kernel command line fragment when it exists. + if [ -f "${RMC_DB}" ] && [ -f "${RMC_CMD}" ]; then + if ${RMC_CMD} -B KBOOTPARAM -d "${RMC_DB}" -o /tmp/kbootparam; then + sed -i "/^[ \t]*options/ s/$/ $(cat /tmp/kbootparam)/" $GUMMIBOOT_CFGS + rm /tmp/kbootparam + fi + fi +fi + +cp /run/media/$1/vmlinuz /boot + +umount /src_root +umount /tgt_root +umount /boot + +sync + +echo "Remove your installation media, and press ENTER" + +read enter + +echo "Rebooting..." +reboot -f diff --git a/common/recipes-core/initrdscripts/initramfs-live-install-efi_%.bbappend b/common/recipes-core/initrdscripts/initramfs-live-install-efi_%.bbappend new file mode 100644 index 00000000..0b3a1d3d --- /dev/null +++ b/common/recipes-core/initrdscripts/initramfs-live-install-efi_%.bbappend @@ -0,0 +1,2 @@ +FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/files:" +PACKAGE_ARCH_intel-x86-common = "${INTEL_COMMON_PACKAGE_ARCH}" diff --git a/common/recipes-core/microcode/intel-microcode_20170707.bb b/common/recipes-core/microcode/intel-microcode_20170707.bb new file mode 100644 index 00000000..2244088b --- /dev/null +++ b/common/recipes-core/microcode/intel-microcode_20170707.bb @@ -0,0 +1,66 @@ +SUMMARY = "Intel Processor Microcode Datafile for Linux" +HOMEPAGE = "http://www.intel.com/" +DESCRIPTION = "The microcode data file contains the latest microcode\ + definitions for all Intel processors. Intel releases microcode updates\ + to correct processor behavior as documented in the respective processor\ + specification updates. While the regular approach to getting this microcode\ + update is via a BIOS upgrade, Intel realizes that this can be an\ + administrative hassle. The Linux operating system and VMware ESX\ + products have a mechanism to update the microcode after booting.\ + For example, this file will be used by the operating system mechanism\ + if the file is placed in the /etc/firmware directory of the Linux system." + +LICENSE = "Intel-Microcode-License" +LIC_FILES_CHKSUM = "file://microcode.dat;md5=e5b1dc41901d2de706d4bccee94bbadc" + +SRC_URI = "https://downloadmirror.intel.com/26925/eng/microcode-${PV}.tgz" +SRC_URI[md5sum] = "fe4bcb12e4600629a81fb65208c34248" +SRC_URI[sha256sum] = "4fd44769bf52a7ac11e90651a307aa6e56ca6e1a814e50d750ba8207973bee93" + +DEPENDS = "iucode-tool-native" +S = "${WORKDIR}" + +COMPATIBLE_HOST = "(i.86|x86_64).*-linux" +PACKAGE_ARCH = "${MACHINE_ARCH}" + +inherit deploy + +# Use any of the iucode_tool parameters to filter specific microcodes from the data file +# For further information, check the iucode-tool's manpage : http://manned.org/iucode-tool +UCODE_FILTER_PARAMETERS ?= "" + +do_compile() { + mkdir -p ${WORKDIR}/ucode/kernel/x86/microcode + ${STAGING_DIR_NATIVE}${sbindir_native}/iucode_tool \ + ${UCODE_FILTER_PARAMETERS} \ + --overwrite \ + --write-to=${WORKDIR}/microcode_${PV}.bin \ + ${WORKDIR}/microcode.dat + + ${STAGING_DIR_NATIVE}${sbindir_native}/iucode_tool \ + ${UCODE_FILTER_PARAMETERS} \ + --overwrite \ + --write-earlyfw=${WORKDIR}/microcode_${PV}.cpio \ + ${WORKDIR}/microcode.dat +} + +do_install() { + install -d ${D}${base_libdir}/firmware/intel-ucode/ + install ${WORKDIR}/microcode_${PV}.bin ${D}${base_libdir}/firmware/intel-ucode/ + cd ${D}${base_libdir}/firmware/intel-ucode/ + ln -sf microcode_${PV}.bin microcode.bin +} + +do_deploy() { + install -d ${DEPLOYDIR} + install ${S}/microcode_${PV}.cpio ${DEPLOYDIR}/ + cd ${DEPLOYDIR} + rm -f microcode.cpio + ln -sf microcode_${PV}.cpio microcode.cpio +} + +addtask deploy before do_build after do_compile + +PACKAGES = "${PN}" + +FILES_${PN} = "${base_libdir}" diff --git a/common/recipes-core/microcode/iucode-tool/0001-Makefile.am-Add-arg-parse-library-for-MUSL-support.patch b/common/recipes-core/microcode/iucode-tool/0001-Makefile.am-Add-arg-parse-library-for-MUSL-support.patch new file mode 100644 index 00000000..ca97d2ab --- /dev/null +++ b/common/recipes-core/microcode/iucode-tool/0001-Makefile.am-Add-arg-parse-library-for-MUSL-support.patch @@ -0,0 +1,29 @@ +From 5f6826b3a59dedf508d5a6122362d69a4813e8e6 Mon Sep 17 00:00:00 2001 +From: Saul Wold <sgw@linux.intel.com> +Date: Fri, 3 Feb 2017 16:08:51 -0800 +Subject: [PATCH] Makefile.am: Add arg-parse library for MUSL support + +iucode-tool needs argp-standalone when used with MUSL, so add this +patch to the Makefile to link with argp + +Upstream-Status: Pending +Signed-off-by: Saul Wold <sgw@linux.intel.com> +--- + Makefile.am | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Makefile.am b/Makefile.am +index 415a241..764fb61 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -5,6 +5,7 @@ + sbin_PROGRAMS = iucode_tool + man_MANS = iucode_tool.8 + ++iucode_tool_LDADD = -largp + iucode_tool_SOURCES = intel_microcode.h intel_microcode.c iucode_tool.c + EXTRA_DIST = autogen.sh CONTRIBUTING + +-- +2.7.4 + diff --git a/common/recipes-core/microcode/iucode-tool_2.1.2.bb b/common/recipes-core/microcode/iucode-tool_2.1.2.bb new file mode 100644 index 00000000..e1fb56f4 --- /dev/null +++ b/common/recipes-core/microcode/iucode-tool_2.1.2.bb @@ -0,0 +1,33 @@ +SUMMARY = "Update Intel CPU microcode" + +DESCRIPTION = "iucode_tool is a program to manipulate Intel i686 and X86-64\ + processor microcode update collections, and to use the kernel facilities to\ + update the microcode on Intel system processors. It can load microcode data\ + files in text and binary format, sort, list and filter the microcode updates\ + contained in these files, write selected microcode updates to a new file in\ + binary format, or upload them to the kernel. \ + It operates on microcode data downloaded directly from Intel:\ + http://feeds.downloadcenter.intel.com/rss/?p=2371\ +" +HOMEPAGE = "https://gitlab.com/iucode-tool/" +BUGTRACKER = "https://bugs.debian.org/cgi-bin/pkgreport.cgi?ordering=normal;archive=0;src=iucode-tool;repeatmerged=0" + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ + file://iucode_tool.c;beginline=1;endline=15;md5=5d8e3639c3b6a80e7d5e0e073933da16" + +DEPENDS_append_libc-musl = " argp-standalone" + +SRC_URI = "https://gitlab.com/iucode-tool/releases/raw/master/iucode-tool_${PV}.tar.xz" +SRC_URI_append_libc-musl = " file://0001-Makefile.am-Add-arg-parse-library-for-MUSL-support.patch" + +SRC_URI[md5sum] = "c6f131a0b69443f5498782a2335973fa" +SRC_URI[sha256sum] = "01f1c02ba6935e0ac8440fb594c2ef57ce4437fcbce539e3ef329f55a6fd71ab" + +inherit autotools + +BBCLASSEXTEND = "native" + +COMPATIBLE_HOST = "(i.86|x86_64).*-linux" + +UPSTREAM_CHECK_URI = "https://gitlab.com/iucode-tool/releases" diff --git a/common/recipes-core/ovmf/files/0001-ovmf-RefkitTestCA-TEST-UEFI-SecureBoot.patch b/common/recipes-core/ovmf/files/0001-ovmf-RefkitTestCA-TEST-UEFI-SecureBoot.patch new file mode 100644 index 00000000..62db0633 --- /dev/null +++ b/common/recipes-core/ovmf/files/0001-ovmf-RefkitTestCA-TEST-UEFI-SecureBoot.patch @@ -0,0 +1,105 @@ +From 48e511481d83c1614cd00a5a2edcf6b5d746b9c4 Mon Sep 17 00:00:00 2001 +From: Mikko Ylinen <mikko.ylinen@linux.intel.com> +Date: Fri, 7 Apr 2017 12:06:14 +0300 +Subject: [PATCH] ovmf: RefkitTestCA: TEST UEFI SecureBoot + +This patch adds refkit-db.cer (via xxd -i) in OVMF's db +signature database when used with EnrollDefaultKeys EFI +application. It's used for testing purposes only. + +Images signed with refkit-db keys are allowed to boot. + +Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com> +--- + OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c | 68 +++++++++++++++++++++++++++ + 1 file changed, 68 insertions(+) + +diff --git a/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c b/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c +index 24ab977..a3c12ba 100644 +--- a/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c ++++ b/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c +@@ -516,6 +516,73 @@ STATIC CONST UINT8 MicrosoftUefiCA[] = { + 0x07, 0x92, 0x9b, 0xf5, 0xa6, 0xbc, 0x59, 0x83, 0x58 + }; + ++STATIC CONST UINT8 RefkitTestCA[] = { ++ 0x30, 0x82, 0x02, 0xfb, 0x30, 0x82, 0x01, 0xe3, 0xa0, 0x03, 0x02, 0x01, ++ 0x02, 0x02, 0x09, 0x00, 0xd4, 0xf6, 0x48, 0xc2, 0x68, 0x19, 0x91, 0xac, ++ 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, ++ 0x0b, 0x05, 0x00, 0x30, 0x14, 0x31, 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, ++ 0x04, 0x03, 0x0c, 0x09, 0x72, 0x65, 0x66, 0x6b, 0x69, 0x74, 0x2d, 0x64, ++ 0x62, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x37, 0x30, 0x34, 0x32, 0x30, 0x31, ++ 0x32, 0x30, 0x36, 0x33, 0x32, 0x5a, 0x17, 0x0d, 0x31, 0x38, 0x30, 0x34, ++ 0x32, 0x30, 0x31, 0x32, 0x30, 0x36, 0x33, 0x32, 0x5a, 0x30, 0x14, 0x31, ++ 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x09, 0x72, 0x65, ++ 0x66, 0x6b, 0x69, 0x74, 0x2d, 0x64, 0x62, 0x30, 0x82, 0x01, 0x22, 0x30, ++ 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, ++ 0x05, 0x00, 0x03, 0x82, 0x01, 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, ++ 0x82, 0x01, 0x01, 0x00, 0xb4, 0x1c, 0x22, 0xa6, 0x22, 0x01, 0x57, 0xcd, ++ 0xf1, 0x4f, 0xaf, 0x72, 0xe3, 0xd9, 0x01, 0x80, 0x50, 0x55, 0xef, 0x02, ++ 0x5e, 0xeb, 0x99, 0x35, 0xcb, 0x7f, 0x2a, 0x79, 0xff, 0xb5, 0x3e, 0xec, ++ 0x5d, 0x92, 0x06, 0x30, 0x20, 0xe7, 0x95, 0xad, 0xa4, 0x84, 0x2e, 0x3f, ++ 0xfa, 0xd7, 0x46, 0xdd, 0x49, 0xa8, 0xe8, 0xe3, 0x79, 0x49, 0xf6, 0x8f, ++ 0x0b, 0x1d, 0xfe, 0x63, 0xa8, 0xd1, 0x63, 0xa3, 0xd6, 0x0d, 0x4e, 0x6c, ++ 0x66, 0x5c, 0xd6, 0x66, 0x26, 0xd1, 0x26, 0x98, 0xd4, 0x4f, 0x76, 0xc9, ++ 0x65, 0x48, 0x58, 0x13, 0x08, 0x31, 0xbc, 0xe5, 0x47, 0x25, 0x65, 0x95, ++ 0x39, 0x89, 0x5f, 0x02, 0xf1, 0xc5, 0x06, 0x17, 0x58, 0xca, 0x09, 0xfd, ++ 0xf6, 0x1e, 0xc5, 0x97, 0xda, 0xa3, 0x4e, 0x1a, 0x48, 0xbe, 0xcf, 0x96, ++ 0x27, 0x04, 0x4b, 0xb7, 0x6d, 0x67, 0xb6, 0x50, 0x18, 0x04, 0x73, 0x51, ++ 0xd2, 0x6a, 0x2d, 0xdf, 0x3b, 0xab, 0xf2, 0x2d, 0x95, 0xd7, 0xa8, 0xb8, ++ 0xa8, 0x30, 0xa1, 0xab, 0x8b, 0x92, 0x2b, 0x60, 0x3e, 0x3a, 0xe5, 0x86, ++ 0x40, 0x71, 0xc1, 0x3f, 0x2d, 0x2e, 0x90, 0xe7, 0xd6, 0xec, 0xcc, 0xc2, ++ 0x0b, 0x79, 0x83, 0x71, 0x6d, 0xf6, 0xa3, 0xa9, 0x4c, 0xcd, 0x46, 0x81, ++ 0xdc, 0xef, 0xec, 0x51, 0xbe, 0x81, 0x2a, 0xf1, 0x78, 0x73, 0x41, 0xdb, ++ 0x54, 0xce, 0x7c, 0xce, 0xa2, 0xe3, 0x90, 0x4f, 0x45, 0x1a, 0xf9, 0x3d, ++ 0x88, 0xfc, 0x0e, 0xed, 0xd3, 0x69, 0x22, 0x4c, 0xfa, 0x0a, 0x69, 0xd1, ++ 0x48, 0xc0, 0xaa, 0xa9, 0x3a, 0xb3, 0x8f, 0x10, 0x3a, 0x76, 0xa8, 0x0c, ++ 0x7a, 0x3d, 0xd8, 0x79, 0xce, 0x1c, 0x96, 0x62, 0xf4, 0x06, 0xee, 0x47, ++ 0xe8, 0xe0, 0x69, 0x91, 0xae, 0xea, 0x34, 0xcf, 0xda, 0xa8, 0xb4, 0x39, ++ 0x5e, 0xf3, 0x7a, 0xd0, 0x88, 0x48, 0x47, 0x69, 0x02, 0x03, 0x01, 0x00, ++ 0x01, 0xa3, 0x50, 0x30, 0x4e, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, ++ 0x04, 0x16, 0x04, 0x14, 0x68, 0x60, 0x11, 0x25, 0x85, 0x14, 0x78, 0x1b, ++ 0x1a, 0x9f, 0x46, 0x12, 0xe6, 0x21, 0xe4, 0xef, 0xfb, 0x3b, 0xaa, 0xdd, ++ 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, ++ 0x14, 0x68, 0x60, 0x11, 0x25, 0x85, 0x14, 0x78, 0x1b, 0x1a, 0x9f, 0x46, ++ 0x12, 0xe6, 0x21, 0xe4, 0xef, 0xfb, 0x3b, 0xaa, 0xdd, 0x30, 0x0c, 0x06, ++ 0x03, 0x55, 0x1d, 0x13, 0x04, 0x05, 0x30, 0x03, 0x01, 0x01, 0xff, 0x30, ++ 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, ++ 0x05, 0x00, 0x03, 0x82, 0x01, 0x01, 0x00, 0x8f, 0xd2, 0x84, 0x7c, 0x43, ++ 0x47, 0xca, 0x6b, 0xfd, 0x87, 0x83, 0xd0, 0xef, 0x75, 0xd3, 0x20, 0x52, ++ 0x73, 0x18, 0xaa, 0x32, 0x71, 0xfb, 0xa5, 0xf4, 0xc9, 0x11, 0xa3, 0x68, ++ 0x4d, 0xb7, 0x9d, 0xe6, 0xd9, 0x46, 0x24, 0xdc, 0xc7, 0xc2, 0x3b, 0xf9, ++ 0xb0, 0x98, 0xfc, 0xee, 0x34, 0x6e, 0x10, 0x9b, 0x3d, 0x44, 0x6e, 0x33, ++ 0x09, 0x11, 0xb8, 0x29, 0xd6, 0x2d, 0x06, 0xcf, 0x67, 0x8f, 0x96, 0x85, ++ 0x9d, 0x63, 0x72, 0xbf, 0x64, 0x5f, 0x0d, 0xe3, 0xc9, 0x63, 0x19, 0x71, ++ 0xd4, 0x7d, 0x4c, 0x9c, 0x77, 0x46, 0xda, 0x20, 0x97, 0x6d, 0xbc, 0xdd, ++ 0xc2, 0x1f, 0xf3, 0x40, 0x38, 0x1e, 0xe7, 0xcc, 0x55, 0x05, 0x72, 0xba, ++ 0x24, 0x4f, 0xb3, 0x8a, 0x93, 0x0c, 0x30, 0x60, 0xda, 0x9f, 0x6f, 0x35, ++ 0xf6, 0xfb, 0xb0, 0x1f, 0xb3, 0x00, 0xdd, 0xc4, 0xa6, 0xbc, 0xe2, 0x37, ++ 0xc1, 0xa3, 0xef, 0xd9, 0xa1, 0x86, 0xf9, 0xeb, 0xa4, 0xa5, 0x45, 0x38, ++ 0xff, 0x4e, 0x87, 0x4a, 0x41, 0xcf, 0x6e, 0x69, 0x7e, 0x97, 0xbe, 0x2d, ++ 0x22, 0xbc, 0x8d, 0xa0, 0x1a, 0x21, 0x8f, 0x4b, 0x72, 0x90, 0x01, 0x5c, ++ 0xba, 0xa5, 0x9c, 0x2d, 0xd7, 0x25, 0x24, 0xfc, 0xff, 0x5c, 0x58, 0x14, ++ 0x46, 0x30, 0x09, 0x7c, 0x55, 0x64, 0x83, 0x0b, 0xb9, 0xdf, 0xcf, 0x25, ++ 0xee, 0xec, 0xf7, 0xcb, 0xdb, 0xd1, 0x5b, 0x93, 0x93, 0xc8, 0x8a, 0x10, ++ 0x46, 0xb8, 0xb0, 0x35, 0x1c, 0x6c, 0x0d, 0x8f, 0x03, 0x6a, 0x8f, 0x1b, ++ 0x36, 0x68, 0xf3, 0x53, 0x89, 0x36, 0x5b, 0x21, 0x80, 0xde, 0xe3, 0x92, ++ 0x52, 0x94, 0x97, 0x9d, 0x49, 0x89, 0x7d, 0x3e, 0xde, 0x29, 0x51, 0xba, ++ 0x11, 0xf7, 0xba, 0x01, 0xf7, 0xab, 0xea, 0xc1, 0xa7, 0x2e, 0xa3, 0x4d, ++ 0x65, 0xfd, 0x40, 0x71, 0xf1, 0xe2, 0x3f, 0x6c, 0x28, 0xcb, 0xd3 ++}; ++ + // + // The most important thing about the variable payload is that it is a list of + // lists, where the element size of any given *inner* list is constant. +@@ -908,6 +975,7 @@ ShellAppMain ( + &gEfiImageSecurityDatabaseGuid, + MicrosoftPCA, sizeof MicrosoftPCA, &gEfiCallerIdGuid, + MicrosoftUefiCA, sizeof MicrosoftUefiCA, &gEfiCallerIdGuid, ++ RefkitTestCA, sizeof RefkitTestCA, &gEfiCallerIdGuid, + NULL); + if (EFI_ERROR (Status)) { + return 1; +-- +2.1.4 + diff --git a/common/recipes-core/ovmf/ovmf-shell-image-enrollkeys.bb b/common/recipes-core/ovmf/ovmf-shell-image-enrollkeys.bb new file mode 100644 index 00000000..b20f6e58 --- /dev/null +++ b/common/recipes-core/ovmf/ovmf-shell-image-enrollkeys.bb @@ -0,0 +1,13 @@ +require recipes-core/ovmf/ovmf-shell-image.bb + +WKS_SEARCH_PATH_append = ":${COREBASE}/meta/recipes-core/ovmf" + +QB_DRIVE_TYPE = "/dev/vd" + +do_image_append() { + cat > ${IMAGE_ROOTFS}/startup.nsh << EOF +EnrollDefaultKeys +reset +EOF + +} diff --git a/common/recipes-core/ovmf/ovmf_%.bbappend b/common/recipes-core/ovmf/ovmf_%.bbappend new file mode 100644 index 00000000..bbf5fa32 --- /dev/null +++ b/common/recipes-core/ovmf/ovmf_%.bbappend @@ -0,0 +1,6 @@ +FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/files:" + +SRC_URI_append_intel-x86-common = " \ + file://0001-ovmf-RefkitTestCA-TEST-UEFI-SecureBoot.patch \ +" +PACKAGECONFIG_append_intel-x86-common = " secureboot" diff --git a/common/recipes-graphics/intel-gpu-tools/intel-gpu-tools_1.19.bb b/common/recipes-graphics/intel-gpu-tools/intel-gpu-tools_1.19.bb new file mode 100644 index 00000000..de9ed609 --- /dev/null +++ b/common/recipes-graphics/intel-gpu-tools/intel-gpu-tools_1.19.bb @@ -0,0 +1,40 @@ +require ${COREBASE}/meta/recipes-graphics/xorg-app/xorg-app-common.inc + +SUMMARY = "Intel GPU tools" +DESCRIPTION = "Variety of small tools for testing intel graphics." + +LIC_FILES_CHKSUM = "file://COPYING;md5=e4b3dd344780e0400593b21b115a6947" + +LICENSE_append = " & ISC" + +inherit autotools gtk-doc + +DEPENDS += "libdrm libpciaccess cairo udev glib-2.0 libxv libx11 libxext libxrandr procps" +RDEPENDS_${PN} += "bash" +RDEPENDS_${PN}-tests += "bash" + +PACKAGE_BEFORE_PN = "${PN}-benchmarks ${PN}-tests" + +SRC_URI[md5sum] = "4fdfa56acca3b046fc61fb12686656f3" +SRC_URI[sha256sum] = "a49c8ae7c0431c1f33cd9492f83ec4e06e98a48429178e4bd22d9a1a87e3b0f1" + +PACKAGECONFIG ??= "" +PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind,libunwind" + +EXTRA_OECONF = "--disable-nouveau --disable-shader-debugger" +COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux" +COMPATIBLE_HOST_libc-musl_class-target = "null" + +gputools_sysroot_preprocess() { + rm -f ${SYSROOT_DESTDIR}${libdir}/pkgconfig/intel-gen4asm.pc +} +SYSROOT_PREPROCESS_FUNCS += "gputools_sysroot_preprocess" + +FILES_${PN} += "${libdir}/intel_aubdump.so" +FILES_${PN}-benchmarks += "${libexecdir}/intel-gpu-tools/benchmarks" +FILES_${PN}-tests += "\ + ${libexecdir}/intel-gpu-tools/*\ + ${datadir}/intel-gpu-tools/1080p-right.png\ + ${datadir}/intel-gpu-tools/1080p-left.png\ + ${datadir}/intel-gpu-tools/pass.png\ + ${datadir}/intel-gpu-tools/test-list.txt" diff --git a/common/recipes-graphics/xorg-driver/xf86-video-ast_1.1.5.bb b/common/recipes-graphics/xorg-driver/xf86-video-ast_1.1.5.bb new file mode 100644 index 00000000..090efd62 --- /dev/null +++ b/common/recipes-graphics/xorg-driver/xf86-video-ast_1.1.5.bb @@ -0,0 +1,12 @@ +require recipes-graphics/xorg-driver/xorg-driver-video.inc + +SUMMARY = "X.Org X server -- ASpeed Technologies graphics driver" + +DESCRIPTION = "ast is an Xorg driver for ASpeed Technologies video cards" + +LIC_FILES_CHKSUM = "file://COPYING;md5=0b8c242f0218eea5caa949b7910a774b" + +DEPENDS += "libpciaccess" + +SRC_URI[md5sum] = "4f85febe48d51e53624550a96fc9e9ee" +SRC_URI[sha256sum] = "1edbbc55d47d3fd71dec99b15c2483e22738c642623a0fb86ef4a81a9067a2de" diff --git a/common/recipes-graphics/xorg-driver/xf86-video-mga/checkfile.patch b/common/recipes-graphics/xorg-driver/xf86-video-mga/checkfile.patch new file mode 100644 index 00000000..ceae6dfb --- /dev/null +++ b/common/recipes-graphics/xorg-driver/xf86-video-mga/checkfile.patch @@ -0,0 +1,68 @@ +Upstream-Status: Submitted [https://bugs.freedesktop.org/show_bug.cgi?id=57606] +Signed-off-by: Ross Burton <ross.burton@intel.com> + +From c9014a8f3c9b691b5aa7b1f3ec66cf7c84b8211b Mon Sep 17 00:00:00 2001 +From: Ross Burton <ross.burton@intel.com> +Date: Thu, 29 Nov 2012 11:00:43 +0000 +Subject: [PATCH] build: dont use AC_CHECK_FILE when enabling DRI + +Automatically enabling or disabling a feature based on installed files isn't +deterministic, and AC_CHECK_FILE returns an error when cross-compiling. + +Fix this by enabling DRI by default, and removing the explicit file checks as +pkg-config is good enough. + +(#57606) + +Signed-off-by: Ross Burton <ross.burton@intel.com> +--- + configure.ac | 25 ++----------------------- + 1 file changed, 2 insertions(+), 23 deletions(-) + +diff --git a/configure.ac b/configure.ac +index fca1a9c..d2aa2ed 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -55,9 +55,9 @@ AC_ARG_WITH(xorg-module-dir, + [moduledir="$libdir/xorg/modules"]) + + AC_ARG_ENABLE(dri, AS_HELP_STRING([--disable-dri], +- [Disable DRI support [[default=auto]]]), ++ [Disable DRI support [[default=enabled]]]), + [DRI="$enableval"], +- [DRI=auto]) ++ [DRI=yes]) + AC_ARG_ENABLE(exa, + AS_HELP_STRING([--disable-exa], + [Disable EXA support [[default=enabled]]]), +@@ -76,27 +76,6 @@ sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` + + # Checks for libraries. + +-if test "x$DRI" != xno; then +- AC_CHECK_FILE([${sdkdir}/dri.h], +- [have_dri_h="yes"], [have_dri_h="no"]) +- AC_CHECK_FILE([${sdkdir}/sarea.h], +- [have_sarea_h="yes"], [have_sarea_h="no"]) +- AC_CHECK_FILE([${sdkdir}/dristruct.h], +- [have_dristruct_h="yes"], [have_dristruct_h="no"]) +-fi +- +-AC_MSG_CHECKING([whether to include DRI support]) +-if test "x$DRI" = xauto; then +- if test "x$have_dri_h" = xyes && \ +- test "x$have_sarea_h" = xyes && \ +- test "x$have_dristruct_h" = xyes; then +- DRI="yes" +- else +- DRI="no" +- fi +-fi +-AC_MSG_RESULT([$DRI]) +- + AM_CONDITIONAL(DRI, test "x$DRI" = xyes) + if test "x$DRI" = xyes; then + PKG_CHECK_MODULES(DRI, [libdrm >= 2.0 xf86driproto]) +-- +1.7.10.4 + diff --git a/common/recipes-graphics/xorg-driver/xf86-video-mga_1.6.5.bb b/common/recipes-graphics/xorg-driver/xf86-video-mga_1.6.5.bb new file mode 100644 index 00000000..d30936b6 --- /dev/null +++ b/common/recipes-graphics/xorg-driver/xf86-video-mga_1.6.5.bb @@ -0,0 +1,23 @@ +require recipes-graphics/xorg-driver/xorg-driver-video.inc + +SUMMARY = "X.Org X server -- Matrox MGA display driver" + +DESCRIPTION = "mga is an Xorg driver for Matrox video cards" + +LIC_FILES_CHKSUM = "file://COPYING;md5=bc1395d2cd32dfc5d6c57d2d8f83d3fc" + +SRC_URI += "file://checkfile.patch" + +DEPENDS += "virtual/libx11 libpciaccess" + +PR = "r1" + +COMPATIBLE_HOST = '(i.86.*-linux|x86_64.*-linux)' + +SRC_URI[md5sum] = "3ee2549247e01de3e7bce52c27483118" +SRC_URI[sha256sum] = "b663cd8e6364f7c4e2637b9fcab9861d0e3971518c73b00d213f6545a1289422" + +PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'dri', '', d)}" +PACKAGECONFIG[dri] = "--enable-dri,--disable-dri,drm xf86driproto,xserver-xorg-extension-dri" + +RDEPENDS_${PN} = "xserver-xorg-module-exa" diff --git a/common/recipes-kernel/cryptodev/cryptodev-module/0001-zc-Force-4.10-get_user_pages_remote-API.patch b/common/recipes-kernel/cryptodev/cryptodev-module/0001-zc-Force-4.10-get_user_pages_remote-API.patch new file mode 100644 index 00000000..353126fe --- /dev/null +++ b/common/recipes-kernel/cryptodev/cryptodev-module/0001-zc-Force-4.10-get_user_pages_remote-API.patch @@ -0,0 +1,26 @@ +From 3fcc81ad127c267018aed96a359bbf01db1bd8ee Mon Sep 17 00:00:00 2001 +From: Saul Wold <sgw@linux.intel.com> +Date: Sat, 1 Apr 2017 11:43:31 -0700 +Subject: [PATCH] zc: Force 4.10 get_user_pages_remote API + +This change forces the newer API, as the linux-intel 4.9-LTS kernel +backported the 4.10 API change in the page handling code. + +Signed-off-by: Saul Wold <sgw@linux.intel.com> +--- + zc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/zc.c b/zc.c +index ae464ff..b2759ce 100644 +--- a/zc.c ++++ b/zc.c +@@ -65,7 +65,7 @@ int __get_userbuf(uint8_t __user *addr, uint32_t len, int write, + #elif (LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)) + ret = get_user_pages_remote(task, mm, + (unsigned long)addr, pgcount, write, 0, pg, NULL); +-#elif (LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)) ++#elif (LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) & 0) + ret = get_user_pages_remote(task, mm, + (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0, + pg, NULL); diff --git a/common/recipes-kernel/cryptodev/cryptodev-module_%.bbappend b/common/recipes-kernel/cryptodev/cryptodev-module_%.bbappend new file mode 100644 index 00000000..c59ddb2f --- /dev/null +++ b/common/recipes-kernel/cryptodev/cryptodev-module_%.bbappend @@ -0,0 +1,9 @@ +FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" + +python() { + # When we add more kernels for linux-intel, we may have to add a Version check + if (d.getVar("PREFERRED_PROVIDER_virtual/kernel") == "linux-intel"): + src_uri = d.getVar("SRC_URI") + d.setVar("SRC_URI", src_uri + + " file://0001-zc-Force-4.10-get_user_pages_remote-API.patch") +} diff --git a/common/recipes-kernel/intel-ethernet/ixgbe.bb b/common/recipes-kernel/intel-ethernet/ixgbe.bb new file mode 100644 index 00000000..5b6f0311 --- /dev/null +++ b/common/recipes-kernel/intel-ethernet/ixgbe.bb @@ -0,0 +1,43 @@ +SUMMARY="ixgbe kernel driver for Intel Magnolia Park 10GbE" +DESCRIPTION="Intel 10-Gbps Ethernet driver for Magnolia Park" +AUTHOR = "Ong Boon Leong" +HOMEPAGE = "http://www.intel.com/network/connectivity/products/server_adapters.htm" +SECTION = "kernel/network" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://${WORKDIR}/${PN}-${PV}/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +PV = "5.1.3" +PR = "r0" + +SRC_URI = "https://sourceforge.net/projects/e1000/files/ixgbe%20stable/${PV}/ixgbe-${PV}.tar.gz" +SRC_URI += "file://0001-ixgbe-src-Makefile-change-make-install-to-make.patch" + +SRC_URI[md5sum] = "ae35ed547aa6a5087672c3f70ce1e676" +SRC_URI[sha256sum] = "9f537d79bddf0a087a17af632d57812d26d26bcfebbd4bdcf10df656ff055bb4" + +S = "${WORKDIR}/${PN}-${PV}/src" +SCRIPT_DIR = "${WORKDIR}/${PN}-${PV}/scripts" + +EXTRA_OEMAKE='KSRC="${STAGING_KERNEL_BUILDDIR}" KVER="${KERNEL_VERSION}" \ + BUILD_ARCH="${TARGET_ARCH}" PREFIX="${D}" \ + SYSTEM_MAP_FILE="${STAGING_KERNEL_BUILDDIR}/System.map-${KERNEL_VERSION}" INSTALL_MOD_PATH="${D}"' + +KERNEL_MODULE_AUTOLOAD_append_intel-core2-32 = " ixgbe" +KERNEL_MODULE_AUTOLOAD_append_intel-corei7-64 = " ixgbe" + +inherit module + +do_install_append () { + # Install scripts/set_irq_affinity + install -d ${D}/etc/network + install -m 0755 ${SCRIPT_DIR}/set_irq_affinity ${D}/etc/network +} + +#SSTATE_DUPWHITELIST += "${STAGING_DIR_HOST}/lib/modules/${KERNEL_VERSION}/" + +PACKAGES += "${PN}-script" + +FILES_${PN}-script += "/etc/network/set_irq_affinity" + +#Ignore "ERROR: QA Issue: ixgbe: Files/directories were installed but not shipped" +INSANE_SKIP_${PN} = "installed-vs-shipped" diff --git a/common/recipes-kernel/intel-ethernet/ixgbe/0001-ixgbe-src-Makefile-change-make-install-to-make.patch b/common/recipes-kernel/intel-ethernet/ixgbe/0001-ixgbe-src-Makefile-change-make-install-to-make.patch new file mode 100644 index 00000000..88f5335a --- /dev/null +++ b/common/recipes-kernel/intel-ethernet/ixgbe/0001-ixgbe-src-Makefile-change-make-install-to-make.patch @@ -0,0 +1,40 @@ +From 09c7a5afa76530a3720d97726f2b372f72b0af08 Mon Sep 17 00:00:00 2001 +From: "Goh, Wen Sen" <wen.sen.goh@intel.com> +Date: Wed, 22 Jun 2016 11:18:37 +0800 +Subject: [PATCH] ixgbe: src/Makefile: change make install to make + modules_install + +Per guideline from Linux Documentation at +Documentation/kbuild/modules.txt +the correct target is "modules_install" not "install". + +Upstream-Status: Inappropriate [It is tarball released by Intel Network +driver group] + +--- + src/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 852becb..480ecee 100644 +--- a/Makefile ++++ b/Makefile +@@ -136,7 +136,7 @@ clean: + @-rm -rf *.${MANSECTION}.gz *.ko + + # Install the modules and manpage +-install: default manfile ++modules_install: default manfile + @echo "Copying manpages..." + @install -D -m 644 ${DRIVER}.${MANSECTION}.gz ${INSTALL_MOD_PATH}${MANDIR}/man${MANSECTION}/${DRIVER}.${MANSECTION}.gz + @echo "Installing modules..." +@@ -191,6 +191,6 @@ help: + @echo ' Other variables may be available for tuning make process, see' + @echo ' Kernel Kbuild documentation for more information' + +-.PHONY: default noisy clean manfile silent sparse ccc install uninstall help ++.PHONY: default noisy clean manfile silent sparse ccc modules_install uninstall help + + endif # ifneq($(KERNELRELEASE),) +-- +2.8.3 diff --git a/common/recipes-kernel/intel-ethernet/ixgbevf.bb b/common/recipes-kernel/intel-ethernet/ixgbevf.bb new file mode 100644 index 00000000..bee601ba --- /dev/null +++ b/common/recipes-kernel/intel-ethernet/ixgbevf.bb @@ -0,0 +1,44 @@ +SUMMARY="ixgbevf kernel driver for Intel Magnolia Park 10GbE" +DESCRIPTION="Intel 10-Gbps Ethernet driver for Magnolia Park" +AUTHOR = "Ong Boon Leong" +HOMEPAGE = "http://www.intel.com/network/connectivity/products/server_adapters.htm" +SECTION = "kernel/network" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://${WORKDIR}/${PN}-${PV}/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +PV = "4.1.2" +PR = "r0" + +SRC_URI = "https://sourceforge.net/projects/e1000/files/ixgbevf%20stable/${PV}/ixgbevf-${PV}.tar.gz" +SRC_URI += "file://0001-ixgbevf-src-Makefile-change-make-install-to-make.patch" +SRC_URI += "file://0002-ixgbevf_common.patch" + +SRC_URI[md5sum] = "f02ec46369d1ca949a1e9d2e0eb74d5f" +SRC_URI[sha256sum] = "ab2824541f8a2d8f7b7d26ccbb46359ef551c5d4625fb333014e2b8023ac3ab6" + +S = "${WORKDIR}/${PN}-${PV}/src" +SCRIPT_DIR = "${WORKDIR}/${PN}-${PV}/scripts" + +EXTRA_OEMAKE='KSRC="${STAGING_KERNEL_BUILDDIR}" KVER="${KERNEL_VERSION}" \ + BUILD_ARCH="${TARGET_ARCH}" PREFIX="${D}" \ + SYSTEM_MAP_FILE="${STAGING_KERNEL_BUILDDIR}/System.map-${KERNEL_VERSION}" INSTALL_MOD_PATH="${D}"' + +KERNEL_MODULE_AUTOLOAD_append_intel-core2-32 = " ixgbevf" +KERNEL_MODULE_AUTOLOAD_append_intel-corei7-64 = " ixgbevf" + +inherit module + +do_install_append () { + # Install scripts/set_irq_affinity + install -d ${D}/etc/network + install -m 0755 ${SCRIPT_DIR}/set_irq_affinity ${D}/etc/network +} + +#SSTATE_DUPWHITELIST += "${STAGING_DIR_HOST}/lib/modules/${KERNEL_VERSION}/" + +PACKAGES += "${PN}-script" + +FILES_${PN}-script += "/etc/network/set_irq_affinity" + +#Ignore "ERROR: QA Issue: ixgbe: Files/directories were installed but not shipped" +INSANE_SKIP_${PN} = "installed-vs-shipped" diff --git a/common/recipes-kernel/intel-ethernet/ixgbevf/0001-ixgbevf-src-Makefile-change-make-install-to-make.patch b/common/recipes-kernel/intel-ethernet/ixgbevf/0001-ixgbevf-src-Makefile-change-make-install-to-make.patch new file mode 100644 index 00000000..8234f589 --- /dev/null +++ b/common/recipes-kernel/intel-ethernet/ixgbevf/0001-ixgbevf-src-Makefile-change-make-install-to-make.patch @@ -0,0 +1,32 @@ +From 511ee0d8d40a3e76b3e9875a96228ff370dbdfc6 Mon Sep 17 00:00:00 2001 +From: "Goh, Wen Sen" <wen.sen.goh@intel.com> +Date: Wed, 22 Jun 2016 11:25:41 +0800 +Subject: [PATCH] ixgbevf_patch + +--- + Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 8df134a..8d5660e 100644 +--- a/Makefile ++++ b/Makefile +@@ -100,7 +100,7 @@ clean: + @-rm -rf *.${MANSECTION}.gz *.ko + + # Install the modules and manpage +-install: default manfile ++modules_install: default manfile + @echo "Copying manpages..." + @install -D -m 644 ${DRIVER}.${MANSECTION}.gz ${INSTALL_MOD_PATH}${MANDIR}/man${MANSECTION}/${DRIVER}.${MANSECTION}.gz + @echo "Installing modules..." +@@ -145,6 +145,6 @@ help: + @echo ' Other variables may be available for tuning make process, see' + @echo ' Kernel Kbuild documentation for more information' + +-.PHONY: default noisy clean manfile silent sparse ccc install uninstall help ++.PHONY: default noisy clean manfile silent sparse ccc modules_install uninstall help + + endif # ifneq($(KERNELRELEASE),) +-- +2.8.3 diff --git a/common/recipes-kernel/intel-ethernet/ixgbevf/0002-ixgbevf_common.patch b/common/recipes-kernel/intel-ethernet/ixgbevf/0002-ixgbevf_common.patch new file mode 100644 index 00000000..d442e24d --- /dev/null +++ b/common/recipes-kernel/intel-ethernet/ixgbevf/0002-ixgbevf_common.patch @@ -0,0 +1,23 @@ +From f74fbcd821a394dec58263fd2c2ea62eae298b2f Mon Sep 17 00:00:00 2001 +From: "Goh, Wen Sen" <wen.sen.goh@intel.com> +Date: Sun, 26 Jun 2016 12:01:36 +0800 +Subject: [PATCH] ixgbevf patch + +--- + common.mk | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/common.mk b/common.mk +index b9b01c7..228a926 100644 +--- a/common.mk ++++ b/common.mk +@@ -289,6 +289,7 @@ export INSTALL_MOD_DIR ?= updates/drivers/net/ethernet/intel/${DRIVER} + kernelbuild = ${MAKE} $(if ${GCC_I_SYS},CC="${GCC_I_SYS}") \ + ${CCFLAGS_VAR}="${EXTRA_CFLAGS}" \ + -C "${KSRC}" \ ++ CONFIG_IXGBE=m \ + CONFIG_${DRIVER_UPPERCASE}=m \ + M="${CURDIR}" \ + ${2} ${1}; +-- +2.8.3 diff --git a/common/recipes-kernel/iwlwifi/backport-iwlwifi/0001-Makefile.real-skip-host-install-scripts.patch b/common/recipes-kernel/iwlwifi/backport-iwlwifi/0001-Makefile.real-skip-host-install-scripts.patch new file mode 100644 index 00000000..1d4137ba --- /dev/null +++ b/common/recipes-kernel/iwlwifi/backport-iwlwifi/0001-Makefile.real-skip-host-install-scripts.patch @@ -0,0 +1,36 @@ +From f69ff2fd27903ee052309179271f708d720a2f94 Mon Sep 17 00:00:00 2001 +From: Mikko Ylinen <mikko.ylinen@linux.intel.com> +Date: Thu, 10 Aug 2017 21:12:51 +0300 +Subject: [PATCH] Makefile.real: skip host install scripts + +The scripts run in install target are relevant (and working) +only if the driver installation is run on the build host. + +Skip the scripts when cross-compiling. + +Upstream-Status: Inappropriate [Cross-Compile] + +Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com> +--- + Makefile.real | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/Makefile.real b/Makefile.real +index ba09f99..f5075de 100644 +--- a/Makefile.real ++++ b/Makefile.real +@@ -104,11 +104,6 @@ install: modules + @$(MAKE) -C $(KLIB_BUILD) M=$(BACKPORT_DIR) \ + INSTALL_MOD_DIR=$(KMODDIR) $(KMODPATH_ARG) \ + modules_install +- @./scripts/blacklist.sh $(KLIB)/ $(KLIB)/$(KMODDIR) +- @./scripts/compress_modules.sh $(KLIB)/$(KMODDIR) +- @./scripts/check_depmod.sh +- @/sbin/depmod -a +- @./scripts/update-initramfs.sh $(KLIB) + @echo + @echo Your backported driver modules should be installed now. + @echo Reboot. +-- +2.1.4 + diff --git a/common/recipes-kernel/iwlwifi/backport-iwlwifi/iwlwifi.conf b/common/recipes-kernel/iwlwifi/backport-iwlwifi/iwlwifi.conf new file mode 100644 index 00000000..a0e5f6ff --- /dev/null +++ b/common/recipes-kernel/iwlwifi/backport-iwlwifi/iwlwifi.conf @@ -0,0 +1,12 @@ +# /etc/modprobe.d/iwlwifi.conf +# iwlwifi will dynamically load either iwldvm or iwlmvm depending on the +# microcode file installed on the system. When removing iwlwifi, first +# remove the iwl?vm module and then iwlwifi. +remove iwlwifi (/sbin/lsmod | grep -o -e ^iwlmvm -e ^iwldvm16 -e ^iwldvm -e ^iwlwifi | xargs /sbin/rmmod) && /sbin/modprobe -r mac80211 + +#options iwlwifi lar_disable=1 +#options iwlwifi nvm_file="nvm-sfp-b2-open.bin" +options iwlmvm power_scheme=1 + +# PCI BUS + diff --git a/common/recipes-kernel/iwlwifi/backport-iwlwifi_git.bb b/common/recipes-kernel/iwlwifi/backport-iwlwifi_git.bb new file mode 100644 index 00000000..f793a109 --- /dev/null +++ b/common/recipes-kernel/iwlwifi/backport-iwlwifi_git.bb @@ -0,0 +1,42 @@ +SUMMARY = "Intel Wireless LinuxCore kernel driver" +DESCRIPTION = "Intel Wireless LinuxCore kernel driver" +SECTION = "kernel" +LICENSE = "GPLv2" + +REQUIRED_DISTRO_FEATURES = "wifi" + +LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" + +inherit module + +PV = "30" +SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi;branch=release/LinuxCore${PV}" +SRC_URI += "file://0001-Makefile.real-skip-host-install-scripts.patch" +SRC_URI += "file://iwlwifi.conf" + +SRCREV = "${AUTOREV}" + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE = "INSTALL_MOD_PATH=${D} KLIB_BUILD=${KBUILD_OUTPUT}" + +do_configure() { + CC=gcc CFLAGS= LDFLAGS= make defconfig-iwlwifi-public KLIB_BUILD=${KBUILD_OUTPUT} +} + +MODULES_INSTALL_TARGET="install" + +do_install_append() { + ## install configs and service scripts + install -d ${D}${sysconfdir}/modprobe.d + install -m 0644 ${WORKDIR}/iwlwifi.conf ${D}${sysconfdir}/modprobe.d +} + +SYSTEMD_AUTO_ENABLE_${PN} = "enable" + +RDEPENDS_${PN} = "linux-firmware-iwlwifi" + +KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " iwlwifi" +KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " iwlwifi" + +KERNEL_MODULE_PACKAGE_PREFIX = "backport-iwlwifi" diff --git a/common/recipes-kernel/linux-firmware/linux-firmware_%.bbappend b/common/recipes-kernel/linux-firmware/linux-firmware_%.bbappend new file mode 100644 index 00000000..f6968af8 --- /dev/null +++ b/common/recipes-kernel/linux-firmware/linux-firmware_%.bbappend @@ -0,0 +1,23 @@ +# meta-intel maintains a recipe that installs iwlwifi's LinuxCore wifi +# driver releases. For some iwfwifi LinuxCore supported wireless chips, the +# best/latest firmware blobs are found in the iwlwifi's linux-firmware.git fork. +# +# See: https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi/core_release +# +# This bbappend fetches the -31.ucode (currently, for Intel Wireless 8260 +# only!) that is the best match for the iwlwifi LinuxCore release built. +# +# Note: keep these in sync when updating the iwlwifi_git.bb LinuxCore +# versions. + +SRC_URI_append_intel-x86-common = " https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/linux-firmware.git/plain/iwlwifi-8000C-31.ucode?id=${IWLWIFI_SRCREV};name=iwlwifi-8000C-31" + +IWLWIFI_SRCREV = "942f14f65363f33c3fd8a06db58c8ccca0559335" + +SRC_URI[iwlwifi-8000C-31.md5sum] = "428a84a780bbe864a7af6a6734c4b529" +SRC_URI[iwlwifi-8000C-31.sha256sum] = "5a337c52f9d7a7cb5cb0a13c93232f4de742ed0debef757d68231bdb55455406" + +do_install_append_intel-x86-common() { + # Copy the iwlwifi/LinuxCore required ucode for Intel Wireless 8260 + cp ${WORKDIR}/iwlwifi-8000C-31.ucode\?id\=${IWLWIFI_SRCREV} ${D}/${nonarch_base_libdir}/firmware/iwlwifi-8000C-31.ucode +} diff --git a/common/recipes-kernel/linux/linux-intel-rt_4.9.bb b/common/recipes-kernel/linux/linux-intel-rt_4.9.bb new file mode 100644 index 00000000..3fbe8fda --- /dev/null +++ b/common/recipes-kernel/linux/linux-intel-rt_4.9.bb @@ -0,0 +1,17 @@ + +require linux-intel.inc + +# Skip processing of this recipe if it is not explicitly specified as the +# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying +# to build multiple virtual/kernel providers, e.g. as dependency of +# core-image-rt-sdk, core-image-rt. +python () { + if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-intel-rt": + raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-intel-rt to enable it") +} + +KBRANCH = "base-rt" +SRCREV_machine ?= "fc08e0615edccfb4d297c07531451cb7905fb4f4" +SRCREV_meta ?= "3ddaed3671efc2936efbebf4c5216e11b9dfd55d" + +LINUX_KERNEL_TYPE = "preempt-rt" diff --git a/common/recipes-kernel/linux/linux-intel.inc b/common/recipes-kernel/linux/linux-intel.inc new file mode 100644 index 00000000..46f28efe --- /dev/null +++ b/common/recipes-kernel/linux/linux-intel.inc @@ -0,0 +1,43 @@ +require recipes-kernel/linux/linux-yocto.inc + +FILESEXTRAPATHS_prepend := "${THISDIR}/linux-intel:" + +KERNEL_CONFIG_URI ?= " \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.9;destsuffix=${KMETA} \ + " +SRC_URI = " \ + git://github.com/01org/linux-intel-4.9.git;protocol=https;name=machine;branch=${KBRANCH}; \ + ${KERNEL_CONFIG_URI} \ + " + +SRC_URI_append_core2-32-intel-common = " file://disable_skylake_sound.cfg" + + +LINUX_VERSION ?= "4.9.47" +LINUX_VERSION_EXTENSION ?= "-intel-pk-${LINUX_KERNEL_TYPE}" + +PV = "${LINUX_VERSION}+git${SRCPV}" + +KMETA = "kernel-meta" +KCONF_BSP_AUDIT_LEVEL = "2" + +KERNEL_FEATURES_INTEL_COMMON ?= "" + +COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" +KMACHINE_core2-32-intel-common = "intel-core2-32" +KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" + +COMPATIBLE_MACHINE_corei7-64-intel-common = "${MACHINE}" +KMACHINE_corei7-64-intel-common = "intel-corei7-64" +KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" + +COMPATIBLE_MACHINE_i586-nlp-32-intel-common = "${MACHINE}" +KMACHINE_i586-nlp-32-intel-common = "intel-quark" +KERNEL_FEATURES_append_i586-nlp-32-intel-common = "features/qat/qat.scc" + +# Functionality flags +KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" +KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}" + +KERNEL_MODULE_PROBECONF_corei7-64-intel-common += "snd-soc-skl" +module_conf_snd-soc-skl_corei7-64-intel-common = "blacklist snd-soc-skl" diff --git a/common/recipes-kernel/linux/linux-intel/disable_skylake_sound.cfg b/common/recipes-kernel/linux/linux-intel/disable_skylake_sound.cfg new file mode 100644 index 00000000..f7d7322e --- /dev/null +++ b/common/recipes-kernel/linux/linux-intel/disable_skylake_sound.cfg @@ -0,0 +1,14 @@ +# CONFIG_SND_SOC_INTEL_SKYLAKE is not set +# CONFIG_SND_SOC_INTEL_BXT_DA7219_MAX98357A_MACH is not set +# CONFIG_SND_SOC_INTEL_BXT_FLORIDA_MACH is not set +# CONFIG_SND_SOC_INTEL_BXT_RT298_MACH is not set +# CONFIG_SND_SOC_INTEL_BXT_TDF8532_MACH is not set +# CONFIG_SND_SOC_INTEL_KBL_RT5663_MAX98927_MACH is not set +# CONFIG_SND_SOC_INTEL_SKL_RT286_MACH is not set +# CONFIG_SND_SOC_INTEL_CNL_WM8281_MACH is not set +# CONFIG_SND_SOC_INTEL_CNL_RT274_MACH is not set +# CONFIG_SND_SOC_INTEL_SKL_NAU88L25_SSM4567_MACH is not set +# CONFIG_SND_SOC_INTEL_SKL_NAU88L25_MAX98357A_MACH is not set +# CONFIG_SND_SOC_INTEL_CNL_CS42L42_MACH is not set +# CONFIG_SND_SOC_INTEL_CNL_RT700_MACH is not set +# CONFIG_SND_SOC_INTEL_CNL_SVFPGA_MACH is not set diff --git a/common/recipes-kernel/linux/linux-intel_4.9.bb b/common/recipes-kernel/linux/linux-intel_4.9.bb new file mode 100644 index 00000000..4823c98d --- /dev/null +++ b/common/recipes-kernel/linux/linux-intel_4.9.bb @@ -0,0 +1,13 @@ + +require linux-intel.inc + +KBRANCH = "base" +SRCREV_machine ?= "2d533948da0a7c53a0a662d3764be166ba996d93" +SRCREV_meta ?= "3ddaed3671efc2936efbebf4c5216e11b9dfd55d" + +# For Crystalforest and Romley +KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " uio" +KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " uio" + +# Functionality flags +KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc" diff --git a/common/recipes-kernel/linux/linux-yocto-dev.bbappend b/common/recipes-kernel/linux/linux-yocto-dev.bbappend new file mode 100644 index 00000000..ee33ecc3 --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-dev.bbappend @@ -0,0 +1,26 @@ +FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" + +COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" +KMACHINE_core2-32-intel-common = "intel-core2-32" +KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" + +COMPATIBLE_MACHINE_corei7-64-intel-common = "${MACHINE}" +KMACHINE_corei7-64-intel-common = "intel-corei7-64" +KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" + +# Quark / X1000 BSP Info +COMPATIBLE_MACHINE_i586-nlp-32-intel-common = "${MACHINE}" +KMACHINE_i586-nlp-32-intel-common = "intel-quark" +KERNEL_FEATURES_append_i586-nlp-32-intel-common = "" + +# NOTE: We do not set SRCREVs here as -dev is intended to be built with AUTOREV +# and setting them here breaks the default mechanism to use AUTOREV if the +# default SRCREV is set and linux-yocto-dev is the preferred provider. + +# For Crystalforest and Romley +KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " uio" +KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " uio" + +# For FRI2, NUC +KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " iwlwifi" +KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " iwlwifi" diff --git a/common/recipes-kernel/linux/linux-yocto-rt_4.10.bbappend b/common/recipes-kernel/linux/linux-yocto-rt_4.10.bbappend new file mode 100644 index 00000000..17569a1c --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-rt_4.10.bbappend @@ -0,0 +1,13 @@ +KERNEL_FEATURES_INTEL_COMMON ?= "" + +COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" +KMACHINE_core2-32-intel-common = "intel-core2-32" +KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" + +COMPATIBLE_MACHINE_corei7-64-intel-common = "${MACHINE}" +KMACHINE_corei7-64-intel-common = "intel-corei7-64" +KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" + +COMPATIBLE_MACHINE_i586-nlp-32-intel-common = "${MACHINE}" +KMACHINE_i586-nlp-32-intel-common = "intel-quark" +KERNEL_FEATURES_append_i586-nlp-32-intel-common = "" diff --git a/common/recipes-kernel/linux/linux-yocto-rt_4.12.bbappend b/common/recipes-kernel/linux/linux-yocto-rt_4.12.bbappend new file mode 100644 index 00000000..17569a1c --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-rt_4.12.bbappend @@ -0,0 +1,13 @@ +KERNEL_FEATURES_INTEL_COMMON ?= "" + +COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" +KMACHINE_core2-32-intel-common = "intel-core2-32" +KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" + +COMPATIBLE_MACHINE_corei7-64-intel-common = "${MACHINE}" +KMACHINE_corei7-64-intel-common = "intel-corei7-64" +KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" + +COMPATIBLE_MACHINE_i586-nlp-32-intel-common = "${MACHINE}" +KMACHINE_i586-nlp-32-intel-common = "intel-quark" +KERNEL_FEATURES_append_i586-nlp-32-intel-common = "" diff --git a/common/recipes-kernel/linux/linux-yocto-rt_4.4.bbappend b/common/recipes-kernel/linux/linux-yocto-rt_4.4.bbappend new file mode 100644 index 00000000..c18f4a11 --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-rt_4.4.bbappend @@ -0,0 +1,33 @@ +FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" + +LINUX_VERSION_INTEL_COMMON = "4.4.87" +SRCREV_META_INTEL_COMMON ?= "804d2b3164ec25ed519fd695de9aa0908460c92e" +SRCREV_MACHINE_INTEL_COMMON ?= "d1ce34c9e66fe55382cc196fe7facbe7865c4eed" + +KBRANCH_INTEL_COMMON = "standard/preempt-rt/intel/base" + +KERNEL_FEATURES_INTEL_COMMON ?= "" + +LINUX_VERSION_core2-32-intel-common = "${LINUX_VERSION_INTEL_COMMON}" +COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" +KMACHINE_core2-32-intel-common = "intel-core2-32" +KBRANCH_core2-32-intel-common = "${KBRANCH_INTEL_COMMON}" +SRCREV_meta_core2-32-intel-common ?= "${SRCREV_META_INTEL_COMMON}" +SRCREV_machine_core2-32-intel-common ?= "${SRCREV_MACHINE_INTEL_COMMON}" +KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" + +LINUX_VERSION_corei7-64-intel-common = "${LINUX_VERSION_INTEL_COMMON}" +COMPATIBLE_MACHINE_corei7-64-intel-common = "${MACHINE}" +KMACHINE_corei7-64-intel-common = "intel-corei7-64" +KBRANCH_corei7-64-intel-common = "${KBRANCH_INTEL_COMMON}" +SRCREV_meta_corei7-64-intel-common ?= "${SRCREV_META_INTEL_COMMON}" +SRCREV_machine_corei7-64-intel-common ?= "${SRCREV_MACHINE_INTEL_COMMON}" +KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" + +LINUX_VERSION_i586-nlp-32-intel-common = "${LINUX_VERSION_INTEL_COMMON}" +COMPATIBLE_MACHINE_i586-nlp-32-intel-common = "${MACHINE}" +KMACHINE_i586-nlp-32-intel-common = "intel-quark" +KBRANCH_i586-nlp-32-intel-common = "${KBRANCH_INTEL_COMMON}" +SRCREV_meta_i586-nlp-32-intel-common ?= "${SRCREV_META_INTEL_COMMON}" +SRCREV_machine_i586-nlp-32-intel-common ?= "${SRCREV_MACHINE_INTEL_COMMON}" +KERNEL_FEATURES_append_i586-nlp-32-intel-common = "" diff --git a/common/recipes-kernel/linux/linux-yocto-rt_4.9.bbappend b/common/recipes-kernel/linux/linux-yocto-rt_4.9.bbappend new file mode 100644 index 00000000..9d2e3c0b --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-rt_4.9.bbappend @@ -0,0 +1,13 @@ +KERNEL_FEATURES_INTEL_COMMON = "" + +COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" +KMACHINE_core2-32-intel-common = "intel-core2-32" +KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" + +COMPATIBLE_MACHINE_corei7-64-intel-common = "${MACHINE}" +KMACHINE_corei7-64-intel-common = "intel-corei7-64" +KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" + +COMPATIBLE_MACHINE_i586-nlp-32-intel-common = "${MACHINE}" +KMACHINE_i586-nlp-32-intel-common = "intel-quark" +KERNEL_FEATURES_append_i586-nlp-32-intel-common = "" diff --git a/common/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend b/common/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend new file mode 100644 index 00000000..b8d3d81c --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-tiny_4.10.bbappend @@ -0,0 +1,19 @@ +FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" + +KERNEL_FEATURES_INTEL_COMMON ?= "" + +COMPATIBLE_MACHINE_i586-nlp-32-intel-common = "${MACHINE}" +COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" +COMPATIBLE_MACHINE_corei7-64-intel-common = "${MACHINE}" + +KBRANCH_i586-nlp-32-intel-common = "standard/tiny/base" +KBRANCH_core2-32-intel-common = "standard/tiny/base" +KBRANCH_corei7-64-intel-common = "standard/tiny/base" + +KMACHINE_i586-nlp-32-intel-common = "intel-quark" +KMACHINE_core2-32-intel-common = "intel-core2-32" +KMACHINE_corei7-64-intel-common = "intel-corei7-64" + +KERNEL_FEATURES_append_i586-nlp-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON} cfg/fs/ext4.scc" +KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON} cfg/fs/ext4.scc" +KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON} cfg/fs/ext4.scc" diff --git a/common/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend b/common/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend new file mode 100644 index 00000000..b8d3d81c --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-tiny_4.12.bbappend @@ -0,0 +1,19 @@ +FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" + +KERNEL_FEATURES_INTEL_COMMON ?= "" + +COMPATIBLE_MACHINE_i586-nlp-32-intel-common = "${MACHINE}" +COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" +COMPATIBLE_MACHINE_corei7-64-intel-common = "${MACHINE}" + +KBRANCH_i586-nlp-32-intel-common = "standard/tiny/base" +KBRANCH_core2-32-intel-common = "standard/tiny/base" +KBRANCH_corei7-64-intel-common = "standard/tiny/base" + +KMACHINE_i586-nlp-32-intel-common = "intel-quark" +KMACHINE_core2-32-intel-common = "intel-core2-32" +KMACHINE_corei7-64-intel-common = "intel-corei7-64" + +KERNEL_FEATURES_append_i586-nlp-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON} cfg/fs/ext4.scc" +KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON} cfg/fs/ext4.scc" +KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON} cfg/fs/ext4.scc" diff --git a/common/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend b/common/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend new file mode 100644 index 00000000..54430e21 --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend @@ -0,0 +1,33 @@ +FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" + +EXTRA_OEMAKE = "LD=${STAGING_BINDIR_NATIVE}/${HOST_SYS}/${TARGET_PREFIX}ld AR=${STAGING_BINDIR_NATIVE}/${HOST_SYS}/${TARGET_PREFIX}gcc-ar" + +KERNEL_FEATURES_INTEL_COMMON ?= "" + +LINUX_VERSION_i586-nlp-32-intel-common = "4.4.87" +LINUX_VERSION_core2-32-intel-common = "4.4.87" +LINUX_VERSION_corei7-64-intel-common = "4.4.87" + +SRCREV_meta_i586-nlp-32-intel-common = "804d2b3164ec25ed519fd695de9aa0908460c92e" +SRCREV_meta_core2-32-intel-common = "804d2b3164ec25ed519fd695de9aa0908460c92e" +SRCREV_meta_corei7-64-intel-common = "804d2b3164ec25ed519fd695de9aa0908460c92e" + +SRCREV_machine_i586-nlp-32-intel-common = "85b913cc9d5e13602d69e50bd9cf1a6ef242f9ee" +SRCREV_machine_core2-32-intel-common = "85b913cc9d5e13602d69e50bd9cf1a6ef242f9ee" +SRCREV_machine_corei7-64-intel-common = "85b913cc9d5e13602d69e50bd9cf1a6ef242f9ee" + +COMPATIBLE_MACHINE_i586-nlp-32-intel-common = "${MACHINE}" +COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" +COMPATIBLE_MACHINE_corei7-64-intel-common = "${MACHINE}" + +KBRANCH_i586-nlp-32-intel-common = "standard/tiny/intel/base" +KBRANCH_core2-32-intel-common = "standard/tiny/intel/base" +KBRANCH_corei7-64-intel-common = "standard/tiny/intel/base" + +KMACHINE_i586-nlp-32-intel-common = "intel-quark" +KMACHINE_core2-32-intel-common = "intel-core2-32" +KMACHINE_corei7-64-intel-common = "intel-corei7-64" + +KERNEL_FEATURES_append_i586-nlp-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON} cfg/fs/ext4.scc" +KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON} cfg/fs/ext4.scc" +KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON} cfg/fs/ext4.scc" diff --git a/common/recipes-kernel/linux/linux-yocto-tiny_4.9.bbappend b/common/recipes-kernel/linux/linux-yocto-tiny_4.9.bbappend new file mode 100644 index 00000000..9ecdb95a --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-tiny_4.9.bbappend @@ -0,0 +1,31 @@ +FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" + +EXTRA_OEMAKE = "LD=${STAGING_BINDIR_NATIVE}/${HOST_SYS}/${TARGET_PREFIX}ld AR=${STAGING_BINDIR_NATIVE}/${HOST_SYS}/${TARGET_PREFIX}gcc-ar" + +LINUX_VERSION_i586-nlp-32-intel-common = "4.9.13" +LINUX_VERSION_core2-32-intel-common = "4.9.13" +LINUX_VERSION_corei7-64-intel-common = "4.9.13" + +SRCREV_meta_i586-nlp-32-intel-common = "8f3bc608ae61c5333043167fa31bac33be93c3de" +SRCREV_meta_core2-32-intel-common = "8f3bc608ae61c5333043167fa31bac33be93c3de" +SRCREV_meta_corei7-64-intel-common = "8f3bc608ae61c5333043167fa31bac33be93c3de" + +SRCREV_machine_i586-nlp-32-intel-common = "95c0a80ee83f1cf8e59d733f36e8a9dfd50a0098" +SRCREV_machine_core2-32-intel-common = "95c0a80ee83f1cf8e59d733f36e8a9dfd50a0098" +SRCREV_machine_corei7-64-intel-common = "95c0a80ee83f1cf8e59d733f36e8a9dfd50a0098" + +COMPATIBLE_MACHINE_i586-nlp-32-intel-common = "${MACHINE}" +COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" +COMPATIBLE_MACHINE_corei7-64-intel-common = "${MACHINE}" + +KBRANCH_i586-nlp-32-intel-common = "standard/tiny/base" +KBRANCH_core2-32-intel-common = "standard/tiny/base" +KBRANCH_corei7-64-intel-common = "standard/tiny/base" + +KMACHINE_i586-nlp-32-intel-common = "intel-quark" +KMACHINE_core2-32-intel-common = "intel-core2-32" +KMACHINE_corei7-64-intel-common = "intel-corei7-64" + +KERNEL_FEATURES_append_i586-nlp-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON} cfg/fs/ext4.scc" +KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON} cfg/fs/ext4.scc" +KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON} cfg/fs/ext4.scc" diff --git a/common/recipes-kernel/linux/linux-yocto_%.bbappend b/common/recipes-kernel/linux/linux-yocto_%.bbappend new file mode 100644 index 00000000..7c29be14 --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto_%.bbappend @@ -0,0 +1,4 @@ +# The kernel build is 64-bit regardless, so include both common overrides. +# Without this, the kernel will be missing vars that make it buildable for the +# intel-corei7-64 machine. +MACHINEOVERRIDES_prepend_corei7-64-x32-intel-common = "corei7-64-intel-common:" diff --git a/common/recipes-kernel/linux/linux-yocto_4.10.bbappend b/common/recipes-kernel/linux/linux-yocto_4.10.bbappend new file mode 100644 index 00000000..20504637 --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto_4.10.bbappend @@ -0,0 +1,21 @@ +KERNEL_FEATURES_INTEL_COMMON ?= "" + +COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" +KMACHINE_core2-32-intel-common = "intel-core2-32" +KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" + +COMPATIBLE_MACHINE_corei7-64-intel-common = "${MACHINE}" +KMACHINE_corei7-64-intel-common = "intel-corei7-64" +KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" + +COMPATIBLE_MACHINE_i586-nlp-32-intel-common = "${MACHINE}" +KMACHINE_i586-nlp-32-intel-common = "intel-quark" +KERNEL_FEATURES_append_i586-nlp-32-intel-common = "" + +# For Crystalforest and Romley +KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " uio" +KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " uio" + +# For FRI2, NUC +KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " iwlwifi" +KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " iwlwifi" diff --git a/common/recipes-kernel/linux/linux-yocto_4.12.bbappend b/common/recipes-kernel/linux/linux-yocto_4.12.bbappend new file mode 100644 index 00000000..20504637 --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto_4.12.bbappend @@ -0,0 +1,21 @@ +KERNEL_FEATURES_INTEL_COMMON ?= "" + +COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" +KMACHINE_core2-32-intel-common = "intel-core2-32" +KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" + +COMPATIBLE_MACHINE_corei7-64-intel-common = "${MACHINE}" +KMACHINE_corei7-64-intel-common = "intel-corei7-64" +KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" + +COMPATIBLE_MACHINE_i586-nlp-32-intel-common = "${MACHINE}" +KMACHINE_i586-nlp-32-intel-common = "intel-quark" +KERNEL_FEATURES_append_i586-nlp-32-intel-common = "" + +# For Crystalforest and Romley +KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " uio" +KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " uio" + +# For FRI2, NUC +KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " iwlwifi" +KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " iwlwifi" diff --git a/common/recipes-kernel/linux/linux-yocto_4.4.bbappend b/common/recipes-kernel/linux/linux-yocto_4.4.bbappend new file mode 100644 index 00000000..3b02a932 --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto_4.4.bbappend @@ -0,0 +1,43 @@ +FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" + +LINUX_VERSION_INTEL_COMMON = "4.4.87" +SRCREV_META_INTEL_COMMON = "804d2b3164ec25ed519fd695de9aa0908460c92e" +SRCREV_MACHINE_INTEL_COMMON = "57746baa7ae35660fe807c65b6809e6b16d4a448" + +KBRANCH_INTEL_COMMON = "standard/intel/base" + +KERNEL_FEATURES_INTEL_COMMON ?= "" + +LINUX_VERSION_core2-32-intel-common = "${LINUX_VERSION_INTEL_COMMON}" +COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" +KMACHINE_core2-32-intel-common = "intel-core2-32" +KBRANCH_core2-32-intel-common = "${KBRANCH_INTEL_COMMON}" +SRCREV_meta_core2-32-intel-common ?= "${SRCREV_META_INTEL_COMMON}" +SRCREV_machine_core2-32-intel-common ?= "${SRCREV_MACHINE_INTEL_COMMON}" +KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" + +LINUX_VERSION_corei7-64-intel-common = "${LINUX_VERSION_INTEL_COMMON}" +COMPATIBLE_MACHINE_corei7-64-intel-common = "${MACHINE}" +KMACHINE_corei7-64-intel-common = "intel-corei7-64" +SRCREV_meta_corei7-64-intel-common ?= "${SRCREV_META_INTEL_COMMON}" +SRCREV_machine_corei7-64-intel-common ?= "${@bb.utils.contains('INTEL_MACHINE_SUBTYPE', 'broxton-m', 'a249f6388ace2a4035220c2333649b42c300faa9', '${SRCREV_MACHINE_INTEL_COMMON}', d)}" +KBRANCH_corei7-64-intel-common = "${@bb.utils.contains('INTEL_MACHINE_SUBTYPE', 'broxton-m', 'standard/intel/bxt-rebase;rebaseable=1', '${KBRANCH_INTEL_COMMON}', d)}" +KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" + +# Quark / X1000 BSP Info +LINUX_VERSION_i586-nlp-32-intel-common = "${LINUX_VERSION_INTEL_COMMON}" +COMPATIBLE_MACHINE_i586-nlp-32-intel-common = "${MACHINE}" +KMACHINE_i586-nlp-32-intel-common = "intel-quark" +KBRANCH_i586-nlp-32-intel-common = "${KBRANCH_INTEL_COMMON}" +SRCREV_meta_i586-nlp-32-intel-common ?= "${SRCREV_META_INTEL_COMMON}" +SRCREV_machine_i586-nlp-32-intel-common ?= "${SRCREV_MACHINE_INTEL_COMMON}" +KERNEL_FEATURES_append_i586-nlp-32-intel-common = "" + + +# For Crystalforest and Romley +KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " uio" +KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " uio" + +# For FRI2, NUC +KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " iwlwifi" +KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " iwlwifi" diff --git a/common/recipes-kernel/linux/linux-yocto_4.9.bbappend b/common/recipes-kernel/linux/linux-yocto_4.9.bbappend new file mode 100644 index 00000000..a09fe1a4 --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto_4.9.bbappend @@ -0,0 +1,21 @@ +KERNEL_FEATURES_INTEL_COMMON = "" + +COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" +KMACHINE_core2-32-intel-common = "intel-core2-32" +KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" + +COMPATIBLE_MACHINE_corei7-64-intel-common = "${MACHINE}" +KMACHINE_corei7-64-intel-common = "intel-corei7-64" +KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" + +COMPATIBLE_MACHINE_i586-nlp-32-intel-common = "${MACHINE}" +KMACHINE_i586-nlp-32-intel-common = "intel-quark" +KERNEL_FEATURES_append_i586-nlp-32-intel-common = "" + +# For Crystalforest and Romley +KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " uio" +KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " uio" + +# For FRI2, NUC +KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " iwlwifi" +KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " iwlwifi" diff --git a/common/recipes-kernel/lttng/lttng-modules/0002-lttng-modules-PKT-4.9-yocto-build-failed.patch b/common/recipes-kernel/lttng/lttng-modules/0002-lttng-modules-PKT-4.9-yocto-build-failed.patch new file mode 100644 index 00000000..32b49b8d --- /dev/null +++ b/common/recipes-kernel/lttng/lttng-modules/0002-lttng-modules-PKT-4.9-yocto-build-failed.patch @@ -0,0 +1,38 @@ +From ebfdc8b8af17f9cf23c6878eb52476fde7b48e5c Mon Sep 17 00:00:00 2001 +From: Priyalee Kushwaha <priyalee.kushwaha@intel.com> +Date: Fri, 22 Sep 2017 14:40:57 -0700 +Subject: [PATCH] lttng-modules: PKT 4.9 yocto build failed + +PKT 4.9 yocto kernel backports a patch from upstream and that +changes header include/linux/ktimer.h. Since this backported +patch is only relevant for PKT kernel, we need to carry this +patch. + +Upstream-Status: Backport +Signed-off-by: Kushwaha, Priyalee <priyalee.kushwaha@intel.com> +--- + instrumentation/events/lttng-module/timer.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/instrumentation/events/lttng-module/timer.h b/instrumentation/events/lttng-module/timer.h +index d62fd25..59da988 100644 +--- a/instrumentation/events/lttng-module/timer.h ++++ b/instrumentation/events/lttng-module/timer.h +@@ -16,11 +16,11 @@ struct timer_list; + + #endif /* _TRACE_TIMER_DEF_ */ + +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)) + #define lttng_ktime_get_tv64(kt) (kt) +-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */ ++#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)) */ + #define lttng_ktime_get_tv64(kt) ((kt).tv64) +-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */ ++#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)) */ + + LTTNG_TRACEPOINT_EVENT_CLASS(timer_class, + +-- +2.7.4 + diff --git a/common/recipes-kernel/lttng/lttng-modules_%.bbappend b/common/recipes-kernel/lttng/lttng-modules_%.bbappend new file mode 100644 index 00000000..ee8b8c14 --- /dev/null +++ b/common/recipes-kernel/lttng/lttng-modules_%.bbappend @@ -0,0 +1,7 @@ +FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" + + +LTTNG_PATCH = "${@bb.utils.contains('PREFERRED_PROVIDER_virtual/kernel','linux-intel','file://0002-lttng-modules-PKT-4.9-yocto-build-failed.patch','',d)}" + +SRC_URI += "${LTTNG_PATCH}" + diff --git a/common/recipes-multimedia/libva/libva-intel-driver_1.8.3.bb b/common/recipes-multimedia/libva/libva-intel-driver_1.8.3.bb new file mode 100644 index 00000000..72451c02 --- /dev/null +++ b/common/recipes-multimedia/libva/libva-intel-driver_1.8.3.bb @@ -0,0 +1,35 @@ +SUMMARY = "VA driver for Intel G45 & HD Graphics family" +DESCRIPTION = "libva-driver-intel is the VA-API implementation \ +for Intel G45 chipsets and Intel HD Graphics for Intel Core \ +processor family." + +HOMEPAGE = "http://www.freedesktop.org/wiki/Software/vaapi" +BUGTRACKER = "https://bugs.freedesktop.org" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=2e48940f94acb0af582e5ef03537800f" + +COMPATIBLE_HOST = '(i.86|x86_64).*-linux' + +DEPENDS = "libva libdrm" + +SRC_URI = "git://github.com/01org/intel-vaapi-driver.git;branch=v1.8-branch" +# 1.8.3 release tag +SRCREV = "f1d9ceddc0e84ed8d44dd59017b0e19b75dd5dcd" + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig distro_features_check + +REQUIRED_DISTRO_FEATURES = "opengl" + +PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "x11", "", d)} \ + ${@bb.utils.contains("DISTRO_FEATURES", "opengl wayland", "wayland", "", d)}" +PACKAGECONFIG[x11] = "--enable-x11,--disable-x11" +PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland wayland-native virtual/egl" + +FILES_${PN} += "${libdir}/dri/*.so" +FILES_${PN}-dev += "${libdir}/dri/*.la" +FILES_${PN}-dbg += "${libdir}/dri/.debug" + +UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)" diff --git a/common/recipes-multimedia/libva/va-intel.bb b/common/recipes-multimedia/libva/va-intel.bb new file mode 100644 index 00000000..88539e25 --- /dev/null +++ b/common/recipes-multimedia/libva/va-intel.bb @@ -0,0 +1,32 @@ +DESCRIPTION = "Video Acceleration Add-ons for Intel BSPs" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +S = "${WORKDIR}" + +PR = "r1" + +def map_valibs(d): + # The intel implementation requires the libva-intel-driver package + if bb.utils.contains('MACHINE_FEATURES', 'va-impl-intel', "1", "0", d) == "1": + return "libva libva-intel-driver" + # All meta-intel video acceleration requires libva + return "libva" + +VA_IMPL = "${@map_valibs(d)}" + +PACKAGES = "\ + va-intel \ + " + +ALLOW_EMPTY_va-intel = "1" + +RDEPENDS_va-intel = " \ + ${VA_IMPL} \ + " + +COMPATIBLE_HOST = '(i.86|x86_64).*-linux*' + +inherit distro_features_check + +REQUIRED_DISTRO_FEATURES = "opengl" diff --git a/common/recipes-multimedia/libyami/libyami-utils/0001-Fix-build-with-clang.patch b/common/recipes-multimedia/libyami/libyami-utils/0001-Fix-build-with-clang.patch new file mode 100644 index 00000000..a4a4029c --- /dev/null +++ b/common/recipes-multimedia/libyami/libyami-utils/0001-Fix-build-with-clang.patch @@ -0,0 +1,99 @@ +From b7e66182788cd925570bb4c310e21fbcd3185040 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 12 Aug 2017 08:49:20 -0700 +Subject: [PATCH] Fix build with clang + +Fix errors e.g. +error: 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] + +and + +psnr.cpp:225:17: error: bool literal returned from 'main' [-Werror,-Wmain] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + tests/decodehelp.cpp | 2 +- + tests/encodehelp.h | 2 +- + tests/vpp.cpp | 2 +- + tests/yamitranscode.cpp | 2 +- + testscripts/psnr.cpp | 4 ++-- + 5 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/tests/decodehelp.cpp b/tests/decodehelp.cpp +index a69eab6..2d96598 100644 +--- a/tests/decodehelp.cpp ++++ b/tests/decodehelp.cpp +@@ -70,7 +70,7 @@ bool processCmdLine(int argc, char** argv, DecodeParameter* parameters) + {"capi", no_argument, NULL, 0}, + {NULL, no_argument, NULL, 0}}; + +- char opt; ++ int opt; + while ((opt = getopt_long_only(argc, argv, "h:m:n:i:f:o:w:?", long_opts,&option_index)) != -1){ + switch (opt) { + case 'h': +diff --git a/tests/encodehelp.h b/tests/encodehelp.h +index 57ccd77..76df801 100644 +--- a/tests/encodehelp.h ++++ b/tests/encodehelp.h +@@ -107,7 +107,7 @@ static VideoRateControl string_to_rc_mode(char *str) + + static bool process_cmdline(int argc, char *argv[]) + { +- char opt; ++ int opt; + const struct option long_opts[] = { + { "help", no_argument, NULL, 'h' }, + { "qp", required_argument, NULL, 0 }, +diff --git a/tests/vpp.cpp b/tests/vpp.cpp +index 5a60c0a..52da43b 100644 +--- a/tests/vpp.cpp ++++ b/tests/vpp.cpp +@@ -151,7 +151,7 @@ public: + private: + bool processCmdLine(int argc, char* argv[]) + { +- char opt; ++ int opt; + const struct option long_opts[] = { + { "help", no_argument, NULL, 'h' }, + { "sharpening", required_argument, NULL, 's' }, +diff --git a/tests/yamitranscode.cpp b/tests/yamitranscode.cpp +index 4cb72aa..2fc6725 100755 +--- a/tests/yamitranscode.cpp ++++ b/tests/yamitranscode.cpp +@@ -95,7 +95,7 @@ static VideoRateControl string_to_rc_mode(char *str) + + static bool processCmdLine(int argc, char *argv[], TranscodeParams& para) + { +- char opt; ++ int opt; + const struct option long_opts[] = { + { "help", no_argument, NULL, 'h' }, + { "qp", required_argument, NULL, 0 }, +diff --git a/testscripts/psnr.cpp b/testscripts/psnr.cpp +index 5cc24c9..68bd668 100644 +--- a/testscripts/psnr.cpp ++++ b/testscripts/psnr.cpp +@@ -215,14 +215,14 @@ int main(int argc, char *argv[]) + const char* psnrresult = "average_psnr.txt"; + int width=0,height=0; + int standardpsnr = NORMAL_PSNR; +- char opt; ++ int opt; + while ((opt = getopt(argc, argv, "h:W:H:i:o:s:?")) != -1) + { + switch (opt) { + case 'h': + case '?': + print_help(argv[0]); +- return false; ++ return -1; + case 'i': + filename1 = optarg; + break; +-- +2.14.1 + diff --git a/common/recipes-multimedia/libyami/libyami-utils_1.2.0.bb b/common/recipes-multimedia/libyami/libyami-utils_1.2.0.bb new file mode 100644 index 00000000..62d62d58 --- /dev/null +++ b/common/recipes-multimedia/libyami/libyami-utils_1.2.0.bb @@ -0,0 +1,31 @@ +SUMMARY = "Applications and Scripts for libyami." +DESCRIPTION = "Applications and Scripts for libyami." + +HOMEPAGE = "https://github.com/01org/libyami-utils" +BUGTRACKER = "https://github.com/01org/libyami-utils/issues/new" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" + +SRC_URI = "git://github.com/01org/libyami-utils.git \ + file://0001-Fix-build-with-clang.patch \ + " +SRCREV = "b480c0594a7e761a8ccfe6b19b3f9bd0c3d871a1" +S = "${WORKDIR}/git" + +DEPENDS = "libva libyami" + +EXTRA_OECONF = "--enable-tests-gles --disable-md5" + +inherit autotools pkgconfig distro_features_check + +REQUIRED_DISTRO_FEATURES = "opengl" + +PACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" + +# --enable-x11 needs libva-x11 +# gles-tests fail to build without x11: see https://github.com/01org/libyami-utils/issues/91 +PACKAGECONFIG[x11] = "--enable-x11 --enable-tests-gles,--disable-x11 --disable-tests-gles, virtual/libx11" + +UPSTREAM_CHECK_URI = "http://github.com/01org/libyami-utils/releases" +UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)" diff --git a/common/recipes-multimedia/libyami/libyami/0001-bitWriter.cpp-Delete-unused-CACHEBYTES.patch b/common/recipes-multimedia/libyami/libyami/0001-bitWriter.cpp-Delete-unused-CACHEBYTES.patch new file mode 100644 index 00000000..a96c9b85 --- /dev/null +++ b/common/recipes-multimedia/libyami/libyami/0001-bitWriter.cpp-Delete-unused-CACHEBYTES.patch @@ -0,0 +1,27 @@ +From 294874b610a5b8af9b736b3afc938010af58785e Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 11 Aug 2017 17:15:45 -0700 +Subject: [PATCH 1/9] bitWriter.cpp: Delete unused CACHEBYTES + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + codecparsers/bitWriter.cpp | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/codecparsers/bitWriter.cpp b/codecparsers/bitWriter.cpp +index 9bcb14d..08469bf 100644 +--- a/codecparsers/bitWriter.cpp ++++ b/codecparsers/bitWriter.cpp +@@ -24,7 +24,6 @@ + + namespace YamiParser { + +-const uint32_t CACHEBYTES = sizeof(unsigned long int); + const uint32_t CACHEBITS = sizeof(unsigned long int) * 8; + + // clip to keep lowest n bits +-- +2.14.1 + diff --git a/common/recipes-multimedia/libyami/libyami/0002-typecast-index-from-size_t-to-int.patch b/common/recipes-multimedia/libyami/libyami/0002-typecast-index-from-size_t-to-int.patch new file mode 100644 index 00000000..a216566c --- /dev/null +++ b/common/recipes-multimedia/libyami/libyami/0002-typecast-index-from-size_t-to-int.patch @@ -0,0 +1,42 @@ +From 88fa048e22ad00b04054b8a64df53bd440e01537 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 11 Aug 2017 17:29:02 -0700 +Subject: [PATCH 2/9] typecast index from size_t to int + +size_t is not consistent across architectures e.g. on arm its unsigned int + +Fixes +error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + codecparsers/jpegParser.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/codecparsers/jpegParser.cpp b/codecparsers/jpegParser.cpp +index 2217028..6da5c36 100644 +--- a/codecparsers/jpegParser.cpp ++++ b/codecparsers/jpegParser.cpp +@@ -639,7 +639,7 @@ bool Parser::parseDAC() + + length -= 2; + +- if (index < 0 || index >= (2 * NUM_ARITH_TBLS)) { ++ if ((int)index < 0 || index >= (2 * NUM_ARITH_TBLS)) { + ERROR("Invalid DAC Index"); + return false; + } +@@ -747,7 +747,7 @@ bool Parser::parseDHT() + huffTables = &m_dcHuffTables; + } + +- if (index < 0 || index >= NUM_HUFF_TBLS) { ++ if ((int)index < 0 || index >= NUM_HUFF_TBLS) { + ERROR("Bad Huff Table Index"); + return false; + } +-- +2.14.1 + diff --git a/common/recipes-multimedia/libyami/libyami/0003-Add-Wno-invalid-offsetof-to-compiler-commandline.patch b/common/recipes-multimedia/libyami/libyami/0003-Add-Wno-invalid-offsetof-to-compiler-commandline.patch new file mode 100644 index 00000000..17289602 --- /dev/null +++ b/common/recipes-multimedia/libyami/libyami/0003-Add-Wno-invalid-offsetof-to-compiler-commandline.patch @@ -0,0 +1,29 @@ +From 533d63287e9dd8f269b137c18fbe6c19206c8668 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 11 Aug 2017 17:49:43 -0700 +Subject: [PATCH 3/9] Add -Wno-invalid-offsetof to compiler commandline + +clang++ is fussy about offsetof on non-POD types + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + codecparsers/Makefile.am | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/codecparsers/Makefile.am b/codecparsers/Makefile.am +index 720bf81..d9226b3 100644 +--- a/codecparsers/Makefile.am ++++ b/codecparsers/Makefile.am +@@ -118,6 +118,7 @@ libyami_codecparser_cppflags = \ + -Dvp8dx_start_decode=libyami_vp8dx_start_decode \ + -Dvp8dx_bool_decoder_fill=libyami_vp8dx_bool_decoder_fill \ + -I$(top_srcdir)/interface \ ++ -Wno-invalid-offsetof \ + $(extra_includes) \ + $(NULL) + +-- +2.14.1 + diff --git a/common/recipes-multimedia/libyami/libyami/0004-Typecast-POWER32SUB2-to-uint8_t.patch b/common/recipes-multimedia/libyami/libyami/0004-Typecast-POWER32SUB2-to-uint8_t.patch new file mode 100644 index 00000000..27eca39b --- /dev/null +++ b/common/recipes-multimedia/libyami/libyami/0004-Typecast-POWER32SUB2-to-uint8_t.patch @@ -0,0 +1,33 @@ +From d9c831ee38da4551396fad5cd53c3dfc0e5e0cf8 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 11 Aug 2017 17:57:34 -0700 +Subject: [PATCH 4/9] Typecast POWER32SUB2 to uint8_t + +Fixes + +h265Parser.cpp:1064:5: error: comparison of constant 4294967294 with expression +of type 'uint8_t' (aka 'unsigned char') is always false [-Werror,-Wtautological-constant-out-of-range-compare] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + codecparsers/h265Parser.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/codecparsers/h265Parser.cpp b/codecparsers/h265Parser.cpp +index 0dea3a6..c6cded2 100644 +--- a/codecparsers/h265Parser.cpp ++++ b/codecparsers/h265Parser.cpp +@@ -125,7 +125,7 @@ namespace H265 { + \ + CHECK_READ_UE(var->var##_max_num_reorder_pics[i], 0, var->var##_max_dec_pic_buffering_minus1[i]); \ + \ +- CHECK_READ_UE(var->var##_max_latency_increase_plus1[i], 0, POWER32SUB2); \ ++ CHECK_READ_UE(var->var##_max_latency_increase_plus1[i], 0, (uint8_t)POWER32SUB2); \ + } \ + } + +-- +2.14.1 + diff --git a/common/recipes-multimedia/libyami/libyami/0005-move-c-definitions-out-of-extern-C-block.patch b/common/recipes-multimedia/libyami/libyami/0005-move-c-definitions-out-of-extern-C-block.patch new file mode 100644 index 00000000..e77e85f7 --- /dev/null +++ b/common/recipes-multimedia/libyami/libyami/0005-move-c-definitions-out-of-extern-C-block.patch @@ -0,0 +1,130 @@ +From 3748cf904089878971cfcf66abf14c4d74f8241a Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 11 Aug 2017 18:03:07 -0700 +Subject: [PATCH 5/9] move c++ definitions out of extern "C" block + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + decoder/vaapidecoder_host.cpp | 2 +- + encoder/vaapiencoder_host.cpp | 3 ++- + interface/VideoDecoderHost.h | 8 ++++---- + interface/VideoEncoderHost.h | 8 ++++---- + interface/VideoPostProcessHost.h | 8 ++++---- + vpp/vaapipostprocess_host.cpp | 3 +-- + 6 files changed, 16 insertions(+), 16 deletions(-) + +diff --git a/decoder/vaapidecoder_host.cpp b/decoder/vaapidecoder_host.cpp +index bcc9165..d9129f3 100644 +--- a/decoder/vaapidecoder_host.cpp ++++ b/decoder/vaapidecoder_host.cpp +@@ -100,9 +100,9 @@ void releaseVideoDecoder(IVideoDecoder * p) + { + delete p; + } ++} // extern "C" + + std::vector<std::string> getVideoDecoderMimeTypes() + { + return VaapiDecoderFactory::keys(); + } +-} // extern "C" +diff --git a/encoder/vaapiencoder_host.cpp b/encoder/vaapiencoder_host.cpp +index 49e903a..3ee9354 100644 +--- a/encoder/vaapiencoder_host.cpp ++++ b/encoder/vaapiencoder_host.cpp +@@ -78,9 +78,10 @@ void releaseVideoEncoder(IVideoEncoder* p) { + delete p; + } + ++} // extern "C" ++ + std::vector<std::string> getVideoEncoderMimeTypes() + { + return VaapiEncoderFactory::keys(); + } + +-} // extern "C" +diff --git a/interface/VideoDecoderHost.h b/interface/VideoDecoderHost.h +index 86210fe..fd2ba7b 100644 +--- a/interface/VideoDecoderHost.h ++++ b/interface/VideoDecoderHost.h +@@ -32,12 +32,12 @@ extern "C" { // for dlsym usage + YamiMediaCodec::IVideoDecoder *createVideoDecoder(const char *mimeType); + /// \brief destroy the decoder + void releaseVideoDecoder(YamiMediaCodec::IVideoDecoder * p); +-/** \fn void getVideoDecoderMimeTypes() +- * \brief return the MimeTypes enabled in the current build +-*/ +-std::vector<std::string> getVideoDecoderMimeTypes(); + + typedef YamiMediaCodec::IVideoDecoder *(*YamiCreateVideoDecoderFuncPtr) (const char *mimeType); + typedef void (*YamiReleaseVideoDecoderFuncPtr)(YamiMediaCodec::IVideoDecoder * p); + } ++// \fn void getVideoDecoderMimeTypes() ++// \brief return the MimeTypes enabled in the current build ++// ++std::vector<std::string> getVideoDecoderMimeTypes(); + #endif /* VIDEO_DECODER_HOST_H_ */ +diff --git a/interface/VideoEncoderHost.h b/interface/VideoEncoderHost.h +index fb80335..5fb5ab3 100644 +--- a/interface/VideoEncoderHost.h ++++ b/interface/VideoEncoderHost.h +@@ -32,12 +32,12 @@ extern "C" { // for dlsym usage + YamiMediaCodec::IVideoEncoder *createVideoEncoder(const char *mimeType); + ///brief destroy encoder + void releaseVideoEncoder(YamiMediaCodec::IVideoEncoder * p); +-/** \fn void getVideoEncoderMimeTypes() +- * \brief return the MimeTypes enabled in the current build +-*/ +-std::vector<std::string> getVideoEncoderMimeTypes(); + + typedef YamiMediaCodec::IVideoEncoder *(*YamiCreateVideoEncoderFuncPtr) (const char *mimeType); + typedef void (*YamiReleaseVideoEncoderFuncPtr)(YamiMediaCodec::IVideoEncoder * p); + } + #endif /* VIDEO_ENCODER_HOST_H_ */ ++// \fn void getVideoEncoderMimeTypes() ++// \brief return the MimeTypes enabled in the current build ++// ++std::vector<std::string> getVideoEncoderMimeTypes(); +diff --git a/interface/VideoPostProcessHost.h b/interface/VideoPostProcessHost.h +index de046cd..f1c5ce5 100644 +--- a/interface/VideoPostProcessHost.h ++++ b/interface/VideoPostProcessHost.h +@@ -34,12 +34,12 @@ YamiMediaCodec::IVideoPostProcess *createVideoPostProcess(const char *mimeType); + * \brief destroy encoder + */ + void releaseVideoPostProcess(YamiMediaCodec::IVideoPostProcess * p); +-/** \fn void getVideoPostProcessMimeTypes() +- * \brief return the MimeTypes enabled in the current build +-*/ +-std::vector<std::string> getVideoPostProcessMimeTypes(); + + typedef YamiMediaCodec::IVideoPostProcess *(*YamiCreateVideoPostProcessFuncPtr) (const char *mimeType); + typedef void (*YamiReleaseVideoPostProcessFuncPtr)(YamiMediaCodec::IVideoPostProcess * p); + } + #endif /* VIDEO_POST_PROCESS_HOST_H_ */ ++// \fn void getVideoPostProcessMimeTypes() ++// \brief return the MimeTypes enabled in the current build ++// ++std::vector<std::string> getVideoPostProcessMimeTypes(); +diff --git a/vpp/vaapipostprocess_host.cpp b/vpp/vaapipostprocess_host.cpp +index cd40dea..bc06b38 100644 +--- a/vpp/vaapipostprocess_host.cpp ++++ b/vpp/vaapipostprocess_host.cpp +@@ -75,10 +75,9 @@ void releaseVideoPostProcess(IVideoPostProcess * p) + { + delete p; + } ++} // extern "C" + + std::vector<std::string> getVideoPostProcessMimeTypes() + { + return VaapiPostProcessFactory::keys(); + } +- +-} // extern "C" +-- +2.14.1 + diff --git a/common/recipes-multimedia/libyami/libyami/0006-Avoid-namespace-conflicts-by-adding-explicit-using-n.patch b/common/recipes-multimedia/libyami/libyami/0006-Avoid-namespace-conflicts-by-adding-explicit-using-n.patch new file mode 100644 index 00000000..c9c74520 --- /dev/null +++ b/common/recipes-multimedia/libyami/libyami/0006-Avoid-namespace-conflicts-by-adding-explicit-using-n.patch @@ -0,0 +1,41 @@ +From 27b61f5ab1b1643436f56517e4980734b4b9acca Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 11 Aug 2017 18:38:05 -0700 +Subject: [PATCH 6/9] Avoid namespace conflicts by adding explicit using + <namespace> + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + decoder/vaapidecoder_h264.h | 1 + + decoder/vaapidecoder_h265.h | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/decoder/vaapidecoder_h264.h b/decoder/vaapidecoder_h264.h +index 57e2c27..ea5c2f2 100644 +--- a/decoder/vaapidecoder_h264.h ++++ b/decoder/vaapidecoder_h264.h +@@ -30,6 +30,7 @@ namespace YamiMediaCodec { + + class VaapiDecPictureH264; + class VaapiDecoderH264 : public VaapiDecoderBase { ++using YamiMediaCodec::VaapiDecoderBase::createPicture; + public: + typedef SharedPtr<VaapiDecPictureH264> PicturePtr; + typedef std::vector<PicturePtr> RefSet; +diff --git a/decoder/vaapidecoder_h265.h b/decoder/vaapidecoder_h265.h +index f7e2303..159e25f 100644 +--- a/decoder/vaapidecoder_h265.h ++++ b/decoder/vaapidecoder_h265.h +@@ -38,6 +38,7 @@ namespace YamiMediaCodec { + + class VaapiDecPictureH265; + class VaapiDecoderH265:public VaapiDecoderBase { ++ using YamiMediaCodec::VaapiDecoderBase::createPicture; + typedef YamiParser::H265::SPS SPS; + typedef YamiParser::H265::SliceHeader SliceHeader; + typedef YamiParser::H265::NalUnit NalUnit; +-- +2.14.1 + diff --git a/common/recipes-multimedia/libyami/libyami/0007-Delete-unused-variables.patch b/common/recipes-multimedia/libyami/libyami/0007-Delete-unused-variables.patch new file mode 100644 index 00000000..b80774c9 --- /dev/null +++ b/common/recipes-multimedia/libyami/libyami/0007-Delete-unused-variables.patch @@ -0,0 +1,36 @@ +From b982997c96e11b9c0b3cd58a31af2d0a219713a3 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 11 Aug 2017 18:39:58 -0700 +Subject: [PATCH 7/9] Delete unused variables + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + decoder/vaapidecoder_vp8.cpp | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/decoder/vaapidecoder_vp8.cpp b/decoder/vaapidecoder_vp8.cpp +index 5fc89ec..ff5b896 100644 +--- a/decoder/vaapidecoder_vp8.cpp ++++ b/decoder/vaapidecoder_vp8.cpp +@@ -32,12 +32,12 @@ typedef VaapiDecoderVP8::PicturePtr PicturePtr; + + // the following parameter apply to Intra-Predicted Macroblocks, + // $11.2 $11.4: key frame default probs +-static const uint8_t keyFrameYModeProbs[4] = { 145, 156, 163, 128 }; +-static const uint8_t keyFrameUVModeProbs[3] = { 142, 114, 183 }; ++//static const uint8_t keyFrameYModeProbs[4] = { 145, 156, 163, 128 }; ++//static const uint8_t keyFrameUVModeProbs[3] = { 142, 114, 183 }; + + // $16.1: non-key frame default probs +-static const uint8_t nonKeyFrameDefaultYModeProbs[4] = { 112, 86, 140, 37 }; +-static const uint8_t nonKeyFrameDefaultUVModeProbs[3] = { 162, 101, 204 }; ++//static const uint8_t nonKeyFrameDefaultYModeProbs[4] = { 112, 86, 140, 37 }; ++//static const uint8_t nonKeyFrameDefaultUVModeProbs[3] = { 162, 101, 204 }; + + static const uint32_t surfaceNumVP8 = 3; + +-- +2.14.1 + diff --git a/common/recipes-multimedia/libyami/libyami/0008-NalUnit-is-declared-in-different-namespace.patch b/common/recipes-multimedia/libyami/libyami/0008-NalUnit-is-declared-in-different-namespace.patch new file mode 100644 index 00000000..18b98be8 --- /dev/null +++ b/common/recipes-multimedia/libyami/libyami/0008-NalUnit-is-declared-in-different-namespace.patch @@ -0,0 +1,31 @@ +From c54130511c91e457f1c5bb47729f5e3a0fc0cb91 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 11 Aug 2017 18:42:28 -0700 +Subject: [PATCH 8/9] NalUnit is declared in different namespace + +Fixes +vaapidecoder_h265.h:32:5: error: struct 'NalUnit' was previously declared as a class [-Werror,-Wmismatched-tags] struct NalUnit; + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + decoder/vaapidecoder_h265.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/decoder/vaapidecoder_h265.h b/decoder/vaapidecoder_h265.h +index 159e25f..674638f 100644 +--- a/decoder/vaapidecoder_h265.h ++++ b/decoder/vaapidecoder_h265.h +@@ -29,7 +29,7 @@ namespace YamiParser { + namespace H265 { + struct SPS; + struct SliceHeader; +- struct NalUnit; ++ class NalUnit; + class Parser; + }; + }; +-- +2.14.1 + diff --git a/common/recipes-multimedia/libyami/libyami/0009-Fix-clang-warnings.patch b/common/recipes-multimedia/libyami/libyami/0009-Fix-clang-warnings.patch new file mode 100644 index 00000000..08ef455b --- /dev/null +++ b/common/recipes-multimedia/libyami/libyami/0009-Fix-clang-warnings.patch @@ -0,0 +1,37 @@ +From a54dc7b6a777882f55a3f31bd97748a261db03d2 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 11 Aug 2017 18:53:06 -0700 +Subject: [PATCH 9/9] Fix clang warnings + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + encoder/vaapiencoder_h264.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/encoder/vaapiencoder_h264.cpp b/encoder/vaapiencoder_h264.cpp +index 98bc2ed..94015cb 100644 +--- a/encoder/vaapiencoder_h264.cpp ++++ b/encoder/vaapiencoder_h264.cpp +@@ -509,7 +509,7 @@ bit_writer_write_sps(BitWriter* bitwriter, + } + /* vcl_hrd_parameters_present_flag */ + bitwriter->writeBits(0, 1); +- if (nal_hrd_parameters_present_flag || 0/*vcl_hrd_parameters_present_flag*/) { ++ if (nal_hrd_parameters_present_flag || !!(0)/*vcl_hrd_parameters_present_flag*/) { + /* low_delay_hrd_flag */ + bitwriter->writeBits(0, 1); + } +@@ -1889,7 +1889,7 @@ bool VaapiEncoderH264::addSliceHeaders (const PicturePtr& picture) const + sliceParam->num_macroblocks = curSliceMbs; + sliceParam->macroblock_info = VA_INVALID_ID; + sliceParam->slice_type = h264_get_slice_type (picture->m_type); +- assert (sliceParam->slice_type != -1); ++ assert ((int)sliceParam->slice_type != -1); + sliceParam->idr_pic_id = m_idrNum; + sliceParam->pic_order_cnt_lsb = picture->m_poc % m_maxPicOrderCnt; + +-- +2.14.1 + diff --git a/common/recipes-multimedia/libyami/libyami_1.2.0.bb b/common/recipes-multimedia/libyami/libyami_1.2.0.bb new file mode 100644 index 00000000..1d1d02fa --- /dev/null +++ b/common/recipes-multimedia/libyami/libyami_1.2.0.bb @@ -0,0 +1,34 @@ +SUMMARY = "Yami is media infrastructure base on libva" +DESCRIPTION = "Yet Another Media Infrastructure \ +light weight hardware codec library base on VA-API " + +HOMEPAGE = "https://github.com/01org/libyami" +BUGTRACKER = "https://github.com/01org/libyami/issues/new" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=3b83ef96387f14655fc854ddc3c6bd57" + +SRC_URI = "git://github.com/01org/libyami.git;branch=apache \ + file://0001-bitWriter.cpp-Delete-unused-CACHEBYTES.patch \ + file://0002-typecast-index-from-size_t-to-int.patch \ + file://0003-Add-Wno-invalid-offsetof-to-compiler-commandline.patch \ + file://0004-Typecast-POWER32SUB2-to-uint8_t.patch \ + file://0005-move-c-definitions-out-of-extern-C-block.patch \ + file://0006-Avoid-namespace-conflicts-by-adding-explicit-using-n.patch \ + file://0007-Delete-unused-variables.patch \ + file://0008-NalUnit-is-declared-in-different-namespace.patch \ + file://0009-Fix-clang-warnings.patch \ +" +SRCREV = "c884fc3facbf1a0adf2082a1cf95cb146300a5ca" +S = "${WORKDIR}/git" + +PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "x11", "", d)}" +PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11 libxrandr libxrender" + +DEPENDS = "libva" +inherit autotools pkgconfig distro_features_check + +REQUIRED_DISTRO_FEATURES = "opengl" + +UPSTREAM_CHECK_URI = "https://github.com/01org/libyami/releases" +UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)" diff --git a/common/recipes-rt/images/core-image-rt-sdk.bb b/common/recipes-rt/images/core-image-rt-sdk.bb new file mode 100644 index 00000000..6b43a872 --- /dev/null +++ b/common/recipes-rt/images/core-image-rt-sdk.bb @@ -0,0 +1,20 @@ +require recipes-core/images/core-image-minimal.bb + +# Skip processing of this recipe if linux-intel-rt is not explicitly specified as the +# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying +# to build multiple virtual/kernel providers. +python () { + if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-intel-rt": + raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-intel-rt to enable it") +} + +DESCRIPTION = "Small image capable of booting a device with a test suite and \ +tools for real-time use. It includes the full meta-toolchain, development \ +headers and libraries to form a standalone SDK." +DEPENDS = "linux-intel-rt" + +IMAGE_FEATURES += "dev-pkgs tools-sdk tools-debug eclipse-debug tools-profile tools-testapps debug-tweaks" + +IMAGE_INSTALL += "rt-tests hwlatdetect kernel-dev" + +LICENSE = "MIT" diff --git a/common/recipes-rt/images/core-image-rt.bb b/common/recipes-rt/images/core-image-rt.bb new file mode 100644 index 00000000..4db0a579 --- /dev/null +++ b/common/recipes-rt/images/core-image-rt.bb @@ -0,0 +1,17 @@ +require recipes-core/images/core-image-minimal.bb + +# Skip processing of this recipe if linux-intel-rt is not explicitly specified as the +# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying +# to build multiple virtual/kernel providers. +python () { + if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-intel-rt": + raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-intel-rt to enable it") +} + +DESCRIPTION = "A small image just capable of allowing a device to boot plus a \ +real-time test suite and tools appropriate for real-time use." +DEPENDS = "linux-intel-rt" + +IMAGE_INSTALL += "rt-tests hwlatdetect" + +LICENSE = "MIT" diff --git a/common/recipes-selftest/images/files/incorrect.crt b/common/recipes-selftest/images/files/incorrect.crt new file mode 100644 index 00000000..3a2411ab --- /dev/null +++ b/common/recipes-selftest/images/files/incorrect.crt @@ -0,0 +1,19 @@ +-----BEGIN CERTIFICATE----- +MIIDCTCCAfGgAwIBAgIJAIYXAHv3cQNjMA0GCSqGSIb3DQEBCwUAMBsxGTAXBgNV +BAMMEFRlc3QgWW9jdG8gdGhpbmcwHhcNMTcwMTI1MjI1MjI3WhcNMTgwMTI1MjI1 +MjI3WjAbMRkwFwYDVQQDDBBUZXN0IFlvY3RvIHRoaW5nMIIBIjANBgkqhkiG9w0B +AQEFAAOCAQ8AMIIBCgKCAQEAukI2ioMeL8qaXxMtryonAT51w+Zre0wB8bDBPuXD +SwDVXNWfiKKTfCVEkLEUnsUEd7jiKswCT5orTwCD7aQK0mTrkAWEi8hEI3MkNoeh +T51gkuTfv7A/HgPkhhlU4UQqipI6XoLf7o7PUV33ZfB43//iKY2kLBdsFvs4ALWE +31hLOkCFb+nqMnfZxq7DgvBwIdxJdLQvaskpDMfkna+zE3QWqkH5v55atW8Bunwk +/6q5kqNhyrjZb4i0BqJ5AHFUEQzlDcjpyFVUtR14r0IxjBFMHZXrx4uLe7KvGf/4 +GqpqeFOPqxMsfC5ILJJ7nvwFViqftGgtWg/12bKMTB5saQIDAQABo1AwTjAdBgNV +HQ4EFgQURA8KbgpiGfS2+7MT0H5AvpxeYLowHwYDVR0jBBgwFoAURA8KbgpiGfS2 ++7MT0H5AvpxeYLowDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAK9n+ +9T+hlM2kEpsUgtyihEJbGHzbw+Pj11b0ICntCVuPKewtBMveYp8lejrQwMFNGRMt +ZQe1LFb9HcLeM3MLUz9Lm4BJIjkey3Jfq1AskROYk/bJnFIJIx6P3U9gBa20P46X +LH3g6yub1HR7KZC9nfBsak3FPoJR/SYTJs0HsMeL4878+2IbETA4BL0kbKW48FFW +jF4f6don0eiaF8b4KkfbWKrCaEm+LMxbyBEQ6fIb1cmGY8A9A5houjmgi6YWSkoi +SLpOC9TZ2R51fO9rRsv7XwLK0V9o9YaEYPBg6V/TeJl5nxAZBeVTKVTQbBGZY+l2 +nzN0pKsl7RXLf3SRYA== +-----END CERTIFICATE----- diff --git a/common/recipes-selftest/images/files/incorrect.key b/common/recipes-selftest/images/files/incorrect.key new file mode 100644 index 00000000..d05475b6 --- /dev/null +++ b/common/recipes-selftest/images/files/incorrect.key @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEowIBAAKCAQEAukI2ioMeL8qaXxMtryonAT51w+Zre0wB8bDBPuXDSwDVXNWf +iKKTfCVEkLEUnsUEd7jiKswCT5orTwCD7aQK0mTrkAWEi8hEI3MkNoehT51gkuTf +v7A/HgPkhhlU4UQqipI6XoLf7o7PUV33ZfB43//iKY2kLBdsFvs4ALWE31hLOkCF +b+nqMnfZxq7DgvBwIdxJdLQvaskpDMfkna+zE3QWqkH5v55atW8Bunwk/6q5kqNh +yrjZb4i0BqJ5AHFUEQzlDcjpyFVUtR14r0IxjBFMHZXrx4uLe7KvGf/4GqpqeFOP +qxMsfC5ILJJ7nvwFViqftGgtWg/12bKMTB5saQIDAQABAoIBAQCEtAox86s9N6d2 +164z3998Zmj3UyL+7K9x6JI2YvMabBSYGOeaLOLRj6fjQxdC63H8brBM958p4di7 +Z82XMco4Dok6yoOeJ+hMLYv+gfGvTJxy7DhyVXsSwok99axg9vUsV3TYw3wSdpNF +EKLkcUldpu0W2ADBHUr4sLI85xctHH3Kt0sNDzhgADFa5rDYACXTKHtFOhEqBIwN +FmbuRQirnErUkI3Pczgl2Xy1MlaozH9CB+bLAb5q2FYu4DKgjl4UorC+w2HV41KH +XoL7L36XXqLRHBfEAwOWb8yro+TK8T7gW7aagTI1wgsbbQkjQmOHxclmJACdMOiJ +DjPeR0GBAoGBAO7i2eaEoKa9QlKokN+93uOJD/F6DBi6jF0vGOqWlF8AVTj3kGL3 +X8fY/avrSlg7hKZWdei+Q5PyZViKxqmHjq781ZisKck52Tqz4s7ylqRXSgStinZr +UqrkShCqZ3g1W91gIeVPQz0/b+gBskoHzQ5WQHfV5v9S1PaxjzcYtCrRAoGBAMea +LcA2jjuEjqxa5v5fh8ygcHasJMRKJxW1OCKiQ94DjjzPsdVqZ1sJZChLW/N3nxe7 +wHlNJmsGbJ2w1zD5+qkkPjLq5Q4B5KAd62NNrWaEHFdEc/PPkn4xP7Zkfuu5K+m2 +7z/MF4ibvVh9PvD3HY8FWKEtkqB4rfD8AoUOVd4ZAoGAXxXAsfa8k2Hl0kzyTXyg +CWV3CSERS46FbFngyw9gw2e4hFJWEG5ym3ONlS60iuY16JelmxyQfYUQPewPI0+n +xZMx2fE9OLFj+++6KbF5sLRl6/K/mF8jqo3vxS5uvPRQOo+XLlUcaHalrm1ub/Um +87v1MT3dEmgACKmoXb/hhuECgYAZluiapePiOYJZEmZe4jx0vXTtofAswhz0qYEC +3663vdj0buQrqjKJ91BB4jdtpT5eOpHYe02blv1B0jQkcUfze1QGDxtCineXF37g +Aktiwzkm7v22mjv7tbCnX4buDZVVp0BQ+4dg2iaSO6xgFC5T8amFMGSF8jLKnGRu +ToIvsQKBgADBTse2vnI85NRsYq48ztQuIU2zlGXIAcoPSvGb8Vhty/joc0jWcI5P +raGXBARbuVlcEapK3mDRfO0CQjDaTPK4EYYJwGp8k33Hkkcbgs4kfm308jRsclMr +YeMwQsYyOv45x4iPCwrqZEhpPDvACBi7DB6QvZ0++vJbobTt1jyi +-----END RSA PRIVATE KEY----- diff --git a/common/recipes-selftest/images/files/refkit-db.crt b/common/recipes-selftest/images/files/refkit-db.crt new file mode 100644 index 00000000..22ad6a89 --- /dev/null +++ b/common/recipes-selftest/images/files/refkit-db.crt @@ -0,0 +1,18 @@ +-----BEGIN CERTIFICATE----- +MIIC+zCCAeOgAwIBAgIJANT2SMJoGZGsMA0GCSqGSIb3DQEBCwUAMBQxEjAQBgNV +BAMMCXJlZmtpdC1kYjAeFw0xNzA0MjAxMjA2MzJaFw0xODA0MjAxMjA2MzJaMBQx +EjAQBgNVBAMMCXJlZmtpdC1kYjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC +ggEBALQcIqYiAVfN8U+vcuPZAYBQVe8CXuuZNct/Knn/tT7sXZIGMCDnla2khC4/ ++tdG3Umo6ON5SfaPCx3+Y6jRY6PWDU5sZlzWZibRJpjUT3bJZUhYEwgxvOVHJWWV +OYlfAvHFBhdYygn99h7Fl9qjThpIvs+WJwRLt21ntlAYBHNR0mot3zur8i2V16i4 +qDChq4uSK2A+OuWGQHHBPy0ukOfW7MzCC3mDcW32o6lMzUaB3O/sUb6BKvF4c0Hb +VM58zqLjkE9FGvk9iPwO7dNpIkz6CmnRSMCqqTqzjxA6dqgMej3Yec4clmL0Bu5H +6OBpka7qNM/aqLQ5XvN60IhIR2kCAwEAAaNQME4wHQYDVR0OBBYEFGhgESWFFHgb +Gp9GEuYh5O/7O6rdMB8GA1UdIwQYMBaAFGhgESWFFHgbGp9GEuYh5O/7O6rdMAwG +A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAI/ShHxDR8pr/YeD0O910yBS +cxiqMnH7pfTJEaNoTbed5tlGJNzHwjv5sJj87jRuEJs9RG4zCRG4KdYtBs9nj5aF +nWNyv2RfDePJYxlx1H1MnHdG2iCXbbzdwh/zQDge58xVBXK6JE+zipMMMGDan281 +9vuwH7MA3cSmvOI3waPv2aGG+eukpUU4/06HSkHPbml+l74tIryNoBohj0tykAFc +uqWcLdclJPz/XFgURjAJfFVkgwu5388l7uz3y9vRW5OTyIoQRriwNRxsDY8Dao8b +NmjzU4k2WyGA3uOSUpSXnUmJfT7eKVG6Efe6Afer6sGnLqNNZf1AcfHiP2woy9M= +-----END CERTIFICATE----- diff --git a/common/recipes-selftest/images/files/refkit-db.key b/common/recipes-selftest/images/files/refkit-db.key new file mode 100644 index 00000000..4b54587e --- /dev/null +++ b/common/recipes-selftest/images/files/refkit-db.key @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC0HCKmIgFXzfFP +r3Lj2QGAUFXvAl7rmTXLfyp5/7U+7F2SBjAg55WtpIQuP/rXRt1JqOjjeUn2jwsd +/mOo0WOj1g1ObGZc1mYm0SaY1E92yWVIWBMIMbzlRyVllTmJXwLxxQYXWMoJ/fYe +xZfao04aSL7PlicES7dtZ7ZQGARzUdJqLd87q/ItldeouKgwoauLkitgPjrlhkBx +wT8tLpDn1uzMwgt5g3Ft9qOpTM1Ggdzv7FG+gSrxeHNB21TOfM6i45BPRRr5PYj8 +Du3TaSJM+gpp0UjAqqk6s48QOnaoDHo92HnOHJZi9AbuR+jgaZGu6jTP2qi0OV7z +etCISEdpAgMBAAECggEAbtXplKbUgL4hQ9JKN2Cxhc7qMv0YgI92BVaqQw1S8ffu +1Q+tynH5MDRPi06gBJ59SvkA6AsZsvrv8nM7zQWd9ZKh+aLHk1X04upOgDoW9JiX +FV/txlslTUrs/ohIMfsgCrweNXvUSTXZobIi8s8QHyipE4HpXMFjjZYHIV7GTlgA +PRgGu3NygbWfR8hcx5JtzVz/jka7FFFSbk/pMr0TeJHXP55VfqWLeeSBQmWwooj2 +QcRfqMXgLKgu6uEggaP5HMcfTuWgWNhbke/596CgsUtQ5Gg64Q6v7cKcPy0/lgn1 +PnvfT9uhgEFDLNFkSBxV3ImrNYo73Nqmbp3w5tK9SQKBgQDs/HW7pNnB0LD51qok +pkX0SBvyKxDT1QuU4z0FY9GT7OKOg8Xa0ZGyErt+ZbyFiyUGF5Axc3rJ3DyGslgu +5O+AqcpCQOlOyovGQ6ST9x/gEeVcRnZn1MV4vMxwaOSXtY7u0IGyaDlFn1QWHWCN +imv8OR6YuhivwBIXGzJ16oEqDwKBgQDCj3ls7tlPrLvUQIh8gfjCoInU8fRAqtAe +Ab/OximLsKQPKLDma6xd+X2Fk8Dowdb88GNT99x3VZjHqVJM9URDkiOGKAXA/rBp +jAXhnQwahT8YCzOUHqDYNMMQrXHvbiHqLodGrrO2WjYNmH69prQAk8WYAIwl+hdx +BS70LGLPBwKBgQDU9RinAkBcFjiyieBjBreeCJ50Q5bfhHbf2EOhcE2IbDo6bteB +Bwmxx3uM3cdHCf6/NrVweqFAfBQ3xlPP8BH4wJrsZoBBOWnZRDfEbzHJnMtK3FbS +fzTkhmQAL4Ibgh9rIxspQtcUZVSees+k4VqgUIPaIoDEjgizktEJfS2MqQKBgQDA +rOFtVaRz2PYyHq6LzxMRe3bEIdDn8cEk1kqjdW9TXV07feqiZmNOtXLvRAG4/63u +1Akp8L6ul2Az6qUMfaBa4nC3vQ7lr9P40qhIZATGhsqS/xTXTPWw55999qZsnL6N +cgKZpw1mOzRohmqNWnfMUotOGsywF1n7nUyAlyxLJQKBgElTaNTFYF3MbGfhl1He +fnDXlf8OCOK1i5oIzMLqverb2UN/qp6p0b3SAtcw5cUXcaPlajHrfYgacF/0Qyua +Cerey9GLEdJ7saDWhz0GyJ8yyEXy8CVs0svVaLPWI0s2B7/obzP9+gTb/WE9qZqu +bNoVEpJ/wZhk+IL4+KPmqphu +-----END PRIVATE KEY----- diff --git a/common/recipes-selftest/images/secureboot-selftest-image-signed.bb b/common/recipes-selftest/images/secureboot-selftest-image-signed.bb new file mode 100644 index 00000000..3ce11f32 --- /dev/null +++ b/common/recipes-selftest/images/secureboot-selftest-image-signed.bb @@ -0,0 +1,6 @@ +require secureboot-selftest-image-unsigned.bb + +IMAGE_FEATURES += "secureboot" + +SECURE_BOOT_SIGNING_KEY ?= "${THISDIR}/files/refkit-db.key" +SECURE_BOOT_SIGNING_CERT ?= "${THISDIR}/files/refkit-db.crt" diff --git a/common/recipes-selftest/images/secureboot-selftest-image-unsigned.bb b/common/recipes-selftest/images/secureboot-selftest-image-unsigned.bb new file mode 100644 index 00000000..e03e7b47 --- /dev/null +++ b/common/recipes-selftest/images/secureboot-selftest-image-unsigned.bb @@ -0,0 +1,20 @@ +require recipes-core/images/core-image-minimal.bb + +DEPENDS_remove = "grub-efi" + +inherit uefi-comboapp + +WKS_FILE = "generic-bootdisk.wks.in" + +do_uefiapp_deploy_append() { + for i in ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.boot*.efi; do + target=`basename $i` + target=`echo $target | sed -e 's/${IMAGE_LINK_NAME}.//'` + + cat > ${IMAGE_ROOTFS}/boot/startup.nsh << EOF +$target +reset +EOF + break + done +} diff --git a/common/recipes-support/sbsigntool/sbsigntool-native_git.bb b/common/recipes-support/sbsigntool/sbsigntool-native_git.bb new file mode 100644 index 00000000..430a6a78 --- /dev/null +++ b/common/recipes-support/sbsigntool/sbsigntool-native_git.bb @@ -0,0 +1,77 @@ +DESCRIPTION = "Utility for signing and verifying files for UEFI Secure Boot" +LICENSE = "GPLv3 & LGPL-2.1 & LGPL-3.0 & MIT" + +# sbsigntool statically links to libccan.a which is built with modules +# passed to "create-ccan-tree" (and their dependencies). Therefore, +# we also keep track of all the ccan module licenses. +LIC_FILES_CHKSUM = "file://LICENSE.GPLv3;md5=9eef91148a9b14ec7f9df333daebc746 \ + file://COPYING;md5=a7710ac18adec371b84a9594ed04fd20 \ + file://lib/ccan.git/ccan/endian/LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ + file://lib/ccan.git/ccan/htable/LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ + file://lib/ccan.git/ccan/list/LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ + file://lib/ccan.git/ccan/read_write_all/LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ + file://lib/ccan.git/ccan/talloc/LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ + file://lib/ccan.git/ccan/typesafe_cb/LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ + file://lib/ccan.git/ccan/failtest/LICENSE;md5=6a6a8e020838b23406c81b19c1d46df6 \ + file://lib/ccan.git/ccan/tlist/LICENSE;md5=6a6a8e020838b23406c81b19c1d46df6 \ + file://lib/ccan.git/ccan/time/LICENSE;md5=838c366f69b72c5df05c96dff79b35f2 \ +" + +# The original upstream is git://kernel.ubuntu.com/jk/sbsigntool but it has +# not been maintained and many patches have been backported in this repo. +SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/jejb/sbsigntools.git;protocol=https;name=sbsigntools \ + git://github.com/rustyrussell/ccan.git;protocol=https;destsuffix=git/lib/ccan.git;name=ccan \ + " + +SRCREV_sbsigntools ?= "efbb550858e7bd3f43e64228d22aea440ef6a14d" +SRCREV_ccan ?= "b1f28e17227f2320d07fe052a8a48942fe17caa5" +SRCREV_FORMAT = "sbsigntools_ccan" + +DEPENDS = "binutils-native gnu-efi-native help2man-native openssl10-native util-linux-native" + +PV = "0.8-git${SRCPV}" + +S = "${WORKDIR}/git" + +inherit native autotools pkgconfig + +do_configure_prepend() { + cd ${S} + + if [ ! -e lib/ccan ]; then + + # Use empty SCOREDIR because 'make scores' is not run. + # The default setting depends on (non-whitelisted) host tools. + sed -i -e 's#^\(SCOREDIR=\).*#\1#' lib/ccan.git/Makefile + + lib/ccan.git/tools/create-ccan-tree \ + --build-type=automake lib/ccan \ + talloc read_write_all build_assert array_size endian + fi + + # Create generatable docs from git + ( + echo "Authors of sbsigntool:" + echo + git log --format='%an' | sort -u | sed 's,^,\t,' + ) > AUTHORS + + # Generate simple ChangeLog + git log --date=short --format='%ad %t %an <%ae>%n%n * %s%n' > ChangeLog + + cd ${B} +} + +def efi_arch(d): + import re + harch = d.getVar("HOST_ARCH") + if re.match("i[3456789]86", harch): + return "ia32" + return harch + +EXTRA_OEMAKE = "\ + INCLUDES+='-I${S}/lib/ccan.git/ \ + -I${STAGING_INCDIR_NATIVE}/efi \ + -I${STAGING_INCDIR_NATIVE} \ + -I${STAGING_INCDIR_NATIVE}/efi/${@efi_arch(d)}' \ + " diff --git a/conf/include/maintainers.inc b/conf/include/maintainers.inc new file mode 100644 index 00000000..995ff339 --- /dev/null +++ b/conf/include/maintainers.inc @@ -0,0 +1,23 @@ +# This file contains a list of recipe maintainers for meta-intel + +RECIPE_MAINTAINER_pn-core-image-rt = "Swee Aun Khor <swee.aun.khor@intel.com>" +RECIPE_MAINTAINER_pn-core-image-rt-sdk = "Swee Aun Khor <swee.aun.khor@intel.com>" +RECIPE_MAINTAINER_pn-efilinux = "Swee Aun Khor <swee.aun.khor@intel.com>" +RECIPE_MAINTAINER_pn-gma500-gfx-check = "Wei Tee Ng <wei.tee.ng@intel.com>" +RECIPE_MAINTAINER_pn-intel-gpu-tools = "Wei Tee Ng <wei.tee.ng@intel.com>" +RECIPE_MAINTAINER_pn-intel-microcode = "Swee Aun Khor <swee.aun.khor@intel.com>" +RECIPE_MAINTAINER_pn-intel-minimal-initramfs = "Swee Aun Khor <swee.aun.khor@intel.com>" +RECIPE_MAINTAINER_pn-iucode-tool = "Swee Aun Khor <swee.aun.khor@intel.com>" +RECIPE_MAINTAINER_pn-libva-intel-driver = "Wei Tee Ng <wei.tee.ng@intel.com>" +RECIPE_MAINTAINER_pn-libyami = "Wei Tee Ng <wei.tee.ng@intel.com>" +RECIPE_MAINTAINER_pn-libyami-utils = "Wei Tee Ng <wei.tee.ng@intel.com>" +RECIPE_MAINTAINER_pn-linux-intel = "Swee Aun Khor <swee.aun.khor@intel.com>" +RECIPE_MAINTAINER_pn-linux-intel-rt = "Swee Aun Khor <swee.aun.khor@intel.com>" +RECIPE_MAINTAINER_pn-lms7 = "TBD" +RECIPE_MAINTAINER_pn-lms8 = "TBD" +RECIPE_MAINTAINER_pn-rmc = "Wei Tee Ng <wei.tee.ng@intel.com>" +RECIPE_MAINTAINER_pn-rmc-db = "Wei Tee Ng <wei.tee.ng@intel.com>" +RECIPE_MAINTAINER_pn-thermald = "Swee Aun Khor <swee.aun.khor@intel.com>" +RECIPE_MAINTAINER_pn-va-intel = "Wei Tee Ng <wei.tee.ng@intel.com>" +RECIPE_MAINTAINER_pn-xf86-video-ast = "Wei Tee Ng <wei.tee.ng@intel.com>" +RECIPE_MAINTAINER_pn-xf86-video-mga = "Wei Tee Ng <wei.tee.ng@intel.com>" diff --git a/conf/layer.conf b/conf/layer.conf new file mode 100644 index 00000000..53f831e0 --- /dev/null +++ b/conf/layer.conf @@ -0,0 +1,24 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}:${LAYERDIR}/common" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/common/recipes-*/*/*.bb \ + ${LAYERDIR}/common/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "intel" +BBFILE_PATTERN_intel := "^${LAYERDIR}/common/" +BBFILE_PRIORITY_intel = "5" + +# Additional license directories. +LICENSE_PATH += "${LAYERDIR}/common/custom-licenses" + +LAYERDEPENDS_intel = "core" +LAYERRECOMMENDS_intel = "dpdk intel-qat" + +# This should only be incremented on significant changes that will +# cause compatibility issues with other layers +LAYERVERSION_intel = "4" +LAYERSERIES_COMPAT_intel = "rocko" + + +require ${LAYERDIR}/conf/include/maintainers.inc diff --git a/conf/machine/include/intel-common-pkgarch.inc b/conf/machine/include/intel-common-pkgarch.inc new file mode 100644 index 00000000..d0f208bd --- /dev/null +++ b/conf/machine/include/intel-common-pkgarch.inc @@ -0,0 +1,15 @@ +INTEL_COMMON_PACKAGE_ARCH ?= "${TUNE_PKGARCH}-intel-common" +PACKAGE_ARCH_pn-linux-intel = "${INTEL_COMMON_PACKAGE_ARCH}" +PACKAGE_ARCH_pn-linux-intel-rt = "${INTEL_COMMON_PACKAGE_ARCH}" +PACKAGE_ARCH_pn-linux-intel-tiny = "${INTEL_COMMON_PACKAGE_ARCH}" +PACKAGE_ARCH_pn-linux-intel-dev = "${INTEL_COMMON_PACKAGE_ARCH}" +PACKAGE_ARCH_pn-linux-yocto = "${INTEL_COMMON_PACKAGE_ARCH}" +PACKAGE_ARCH_pn-linux-yocto-rt = "${INTEL_COMMON_PACKAGE_ARCH}" +PACKAGE_ARCH_pn-linux-yocto-tiny = "${INTEL_COMMON_PACKAGE_ARCH}" +PACKAGE_ARCH_pn-linux-yocto-dev = "${INTEL_COMMON_PACKAGE_ARCH}" +PACKAGE_ARCH_pn-intel-microcode = "${INTEL_COMMON_PACKAGE_ARCH}" +PACKAGE_ARCH_pn-backport-iwlwifi = "${INTEL_COMMON_PACKAGE_ARCH}" +PACKAGE_ARCH_pn-ixgbe = "${INTEL_COMMON_PACKAGE_ARCH}" +PACKAGE_ARCH_pn-ixgbevf = "${INTEL_COMMON_PACKAGE_ARCH}" +PACKAGE_EXTRA_ARCHS_append += "${INTEL_COMMON_PACKAGE_ARCH}" +MACHINEOVERRIDES =. "${INTEL_COMMON_PACKAGE_ARCH}:" diff --git a/conf/machine/include/intel-core2-32-common.inc b/conf/machine/include/intel-core2-32-common.inc new file mode 100644 index 00000000..8c469499 --- /dev/null +++ b/conf/machine/include/intel-core2-32-common.inc @@ -0,0 +1,7 @@ +# +# Common configuration for all MACHINEs of the intel-core2 type +# + +DEFAULTTUNE ?= "core2-32" +require conf/machine/include/tune-core2.inc +require conf/machine/include/x86-base.inc diff --git a/conf/machine/include/intel-corei7-64-common.inc b/conf/machine/include/intel-corei7-64-common.inc new file mode 100644 index 00000000..00282569 --- /dev/null +++ b/conf/machine/include/intel-corei7-64-common.inc @@ -0,0 +1,7 @@ +# +# Common configuration for all MACHINES of the intel-corei7-64 type +# + +DEFAULTTUNE ?= "corei7-64" +require conf/machine/include/tune-corei7.inc +require conf/machine/include/x86-base.inc diff --git a/conf/machine/include/intel-quark-common.inc b/conf/machine/include/intel-quark-common.inc new file mode 100644 index 00000000..f7cfe146 --- /dev/null +++ b/conf/machine/include/intel-quark-common.inc @@ -0,0 +1,12 @@ +# +# Common configuration for all MACHINES of the intel-quark type +# + +DEFAULTTUNE ?= "i586-nlp-32" +require conf/machine/include/tune-i586-nlp.inc +require conf/machine/include/x86-base.inc + +# gnutls padlock code uses CMOV instruction in assembly which +# is not valid for Quark. +EXTRA_OECONF_append_pn-gnutls_intel-quark = " --disable-padlock" +EXTRA_OECONF_append_pn-openssl_intel-quark = " no-asm" diff --git a/conf/machine/include/meta-intel.inc b/conf/machine/include/meta-intel.inc new file mode 100644 index 00000000..34a672c0 --- /dev/null +++ b/conf/machine/include/meta-intel.inc @@ -0,0 +1,52 @@ +# +# BSP variables and settings specific to the meta-intel layer. +# You must include the meta-intel layer in your bblayers.conf +# to use them. +# + +# +# XSERVER subcomponents, used to build the XSERVER variable +# + +# Soft set linux-yocto as preferred kernel like x86-base.inc +PREFERRED_PROVIDER_virtual/kernel ?= "linux-intel" +PREFERRED_PROVIDER_virtual/kernel_poky-tiny ?= "linux-intel" +PREFERRED_PROVIDER_virtual/kernel_linuxstdbase ?= "linux-yocto" +PREFERRED_VERSION_linux-intel ?= "4.9%" + +# for Xserver older than 1.13.0 +OLD_XSERVER_X86_EXT = "xserver-xorg-extension-dri \ + xserver-xorg-extension-dri2 \ + xserver-xorg-extension-extmod \ + xserver-xorg-extension-dbe \ + " + +XSERVER_X86_MATROX_MGA = "xf86-video-mga \ + " + +XSERVER_X86_ASPEED_AST = "xf86-video-ast \ + " + +# include the user space intel microcode loading support in the generated images. +MACHINE_ESSENTIAL_EXTRA_RDEPENDS_append = "${@bb.utils.contains('MACHINE_FEATURES', 'intel-ucode', ' intel-microcode', '', d)} thermald" + +# recommended extra packages common to all intel machines +MACHINE_EXTRA_RRECOMMENDS_append = " kernel-modules linux-firmware" + +# for the early boot time kernel microcode loading support, +# merge the microcode data in the final initrd image. +INITRD_LIVE_prepend = "${@bb.utils.contains('MACHINE_FEATURES', 'intel-ucode', '${DEPLOY_DIR_IMAGE}/microcode.cpio ', '', d)}" + +DISK_SIGNATURE_UUID ??= "deadbeef-dead-beef-dead-beefdeadbeef" + +EFI_PROVIDER ?= "rmc-boot" + +# Add general MACHINEOVERRIDE for meta-intel +MACHINEOVERRIDES =. "intel-x86-common:" + +# Definition of (more or less) suitable virtual machines. +require conf/machine/include/qemuboot-intel.inc + +# Ensure that the extra tools needed by qemu are built when building images +# and tweak machine definition to make the result more usable under qemu. +require conf/machine/include/qemu-intel.inc diff --git a/conf/machine/include/qemu-intel.inc b/conf/machine/include/qemu-intel.inc new file mode 100644 index 00000000..81510404 --- /dev/null +++ b/conf/machine/include/qemu-intel.inc @@ -0,0 +1,19 @@ +# Similar to meta/conf/machine/include/qemu.inc but influences the +# distro content (in particular the kernel) less than qemu.inc. + +# Ensure that qemu gets built when building images. +EXTRA_IMAGEDEPENDS += "qemu-native qemu-helper-native" + +# Build ovmf firmware for uefi support in qemu. +EXTRA_IMAGEDEPENDS += "ovmf" + +# runqemu uses virtio, so we have to enable the corresponding +# kernel drivers. +KERNEL_FEATURES_INTEL_COMMON += "cfg/virtio.scc" + +# Other useful extensions which are not enabled by default: +# rng-tools to take advantage of qemu's virtio-rng-pci device. +# MACHINE_EXTRA_RRECOMMENDS += "rng-tools" + +# Creates the necessary .qemuboot.conf file for each image. +IMAGE_CLASSES += "qemuboot" diff --git a/conf/machine/include/qemuboot-intel.inc b/conf/machine/include/qemuboot-intel.inc new file mode 100644 index 00000000..cb52330b --- /dev/null +++ b/conf/machine/include/qemuboot-intel.inc @@ -0,0 +1,19 @@ +# For runqemu +IMAGE_CLASSES += "qemuboot" +QB_SYSTEM_NAME_intel-core2-32 = "qemu-system-i386" +QB_CPU_intel-core2-32 = "-cpu coreduo" +QB_CPU_KVM_intel-core2-32 = "-cpu kvm32" + +QB_SYSTEM_NAME_intel-corei7-64 = "qemu-system-x86_64" +QB_CPU_intel-corei7-64 = "-cpu Nehalem" +QB_CPU_KVM_intel-corei7-64 = "-cpu kvm64" + +QB_SYSTEM_NAME_intel-quark = "qemu-system-i386" +QB_CPU_intel-quark = "-cpu coreduo" +QB_CPU_KVM_intel-quark = "-cpu kvm32" + +QB_AUDIO_DRV = "alsa" +QB_AUDIO_OPT = "-soundhw ac97,es1370" +QB_KERNEL_CMDLINE_APPEND = "vga=0 uvesafb.mode_option=640x480-32 oprofile.timer=1 uvesafb.task_timeout=-1" +# Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy +QB_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 new file mode 100644 index 00000000..abe6f901 --- /dev/null +++ b/conf/machine/intel-core2-32.conf @@ -0,0 +1,35 @@ +#@TYPE: Machine +#@NAME: intel-core2-32 + +#@DESCRIPTION: Machine configuration for 32 bit Intel Core 2 CPU (and later) with MMX, SSE, SSE2, SSE3, and SSSE3 instruction set support. Supports a moderately wide range of drivers that should boot and be usable on "typical" hardware. + +require conf/machine/include/meta-intel.inc +require conf/machine/include/intel-core2-32-common.inc +require conf/machine/include/intel-common-pkgarch.inc + +MACHINE_FEATURES += "pcbios efi" +MACHINE_FEATURES += "va-impl-intel" +MACHINE_FEATURES += "wifi 3g nfc" +MACHINE_FEATURES += "intel-ucode" + +MACHINE_HWCODECS ?= "va-intel gstreamer1.0-vaapi" + +MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "gma500-gfx-check" + +XSERVER ?= "${XSERVER_X86_BASE} \ + ${XSERVER_X86_EXT} \ + ${XSERVER_X86_FBDEV} \ + ${XSERVER_X86_I915} \ + ${XSERVER_X86_I965} \ + ${XSERVER_X86_MODESETTING} \ + ${XSERVER_X86_VESA} \ + ${XSERVER_X86_ASPEED_AST} \ + " + +SYSLINUX_OPTS = "serial 0 115200" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyPCH0" +APPEND += "rootwait console=ttyS0,115200 console=ttyPCH0,115200 console=tty0" + +IMAGE_FSTYPES += "wic" +WKS_FILE ?= "${@bb.utils.contains_any("EFI_PROVIDER", "systemd-boot rmc-boot", "systemd-bootdisk.wks", "mkefidisk.wks", d)}" +do_image_wic[depends] += "gptfdisk-native:do_populate_sysroot mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot" diff --git a/conf/machine/intel-corei7-64.conf b/conf/machine/intel-corei7-64.conf new file mode 100644 index 00000000..78a1f6e9 --- /dev/null +++ b/conf/machine/intel-corei7-64.conf @@ -0,0 +1,46 @@ +#@TYPE: Machine +#@NAME: intel-corei7-64 + +#@DESCRIPTION: Machine configuration for 64 bit Intel Core i7 CPU (and later) with MMX, SSE, SSE2, SSE3, and SSSE3 instruction set support. Supports a moderately wide range of drivers that should boot and be usable on "typical" hardware. + +require conf/machine/include/meta-intel.inc +require conf/machine/include/intel-corei7-64-common.inc +require conf/machine/include/intel-common-pkgarch.inc + +MACHINE_FEATURES += "pcbios efi" +MACHINE_FEATURES += "va-impl-intel" +MACHINE_FEATURES += "wifi 3g nfc" +MACHINE_FEATURES += "intel-ucode" + +MACHINE_HWCODECS ?= "va-intel gstreamer1.0-vaapi" + +MACHINE_EXTRA_RRECOMMENDS += "lms8" + +# Enable optional dpdk: +COMPATIBLE_MACHINE_pn-dpdk = "intel-corei7-64" +COMPATIBLE_MACHINE_pn-dpdk-dev-libibverbs = "intel-corei7-64" +DPDK_TARGET_MACHINE ?= "atm" + +# Enable optional QAT items: +COMPATIBLE_MACHINE_pn-openssl-qat = "intel-corei7-64" +COMPATIBLE_MACHINE_pn-qat16 = "intel-corei7-64" +COMPATIBLE_MACHINE_pn-zlib-qat = "intel-corei7-64" + +XSERVER ?= "${XSERVER_X86_BASE} \ + ${XSERVER_X86_EXT} \ + ${XSERVER_X86_FBDEV} \ + ${XSERVER_X86_I915} \ + ${XSERVER_X86_I965} \ + ${XSERVER_X86_MATROX_MGA} \ + ${XSERVER_X86_MODESETTING} \ + ${XSERVER_X86_VESA} \ + ${XSERVER_X86_ASPEED_AST} \ + " + +SYSLINUX_OPTS = "serial 0 115200" +SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyS2" +APPEND += "rootwait console=ttyS0,115200 console=tty0" + +IMAGE_FSTYPES += "wic" +WKS_FILE ?= "${@bb.utils.contains_any("EFI_PROVIDER", "systemd-boot rmc-boot", "systemd-bootdisk.wks", "mkefidisk.wks", d)}" +do_image_wic[depends] += "gptfdisk-native:do_populate_sysroot mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot" diff --git a/conf/machine/intel-quark.conf b/conf/machine/intel-quark.conf new file mode 100644 index 00000000..17e8c52f --- /dev/null +++ b/conf/machine/intel-quark.conf @@ -0,0 +1,33 @@ +#@TYPE: Machine +#@NAME: quark + +#@DESCRIPTION: Machine configuration for Quark systems + +require conf/machine/include/meta-intel.inc +require conf/machine/include/intel-quark-common.inc +require conf/machine/include/intel-common-pkgarch.inc + +#Avoid pulling in GRUB +MACHINE_ESSENTIAL_EXTRA_RDEPENDS = "" + +MACHINE_FEATURES = "efi usb" +MACHINE_FEATURES += "intel-ucode" + +SERIAL_CONSOLE = "115200 ttyS1" +APPEND += "rootwait console=ttyS1,115200 console=tty0" + +# Bypass the default labels which also has "install" option in OE. +# +# We don't need to do this when constructing direct-boot image with +# wic. But EFI installer in hddimg image doesn't work on quark now, +# so we only provide a live-boot entry in boot menu for images in +# hddimg format. + +LABELS_LIVE = "boot" + +# Ensure that the Lock prefix is omitted for the kernel" +KERNEL_EXTRA_ARGS = "EXTRA_CFLAGS=-Wa,-momit-lock-prefix=yes" + +IMAGE_FSTYPES += "wic" +WKS_FILE ?= "galileodisk-sd.wks" +do_image_wic[depends] += "gptfdisk-native:do_populate_sysroot mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot" diff --git a/documentation/rmc/README b/documentation/rmc/README new file mode 100644 index 00000000..eaa763e1 --- /dev/null +++ b/documentation/rmc/README @@ -0,0 +1,382 @@ +Runtime Machine Configuration (RMC) +-------------------------------------------------------------------------------- +Table of Contents + +Introduction +Usage +Enable RMC Feature +Examples +Troubleshooting +When you (don't) need RMC feature + + +Introduction: +-------------------------------------------------------------------------------- +RMC Project - a light-weight project provide developers a mechanism to keep +their software implementation board-type agnostic, yet still able to customize +software behavior according to the type of a running board at runtime. Recipes +and bbclasses are available for other components to reuse to construct their own +RMC database. + +RMC Feature - An end-to-end solution based on RMC project to have a generic +image capable to apply board-type-specific quirks and configurations for a board +at runtime. It consists of a modified bootloader (systemd-boot), an updated EFI +installer, recipes, bbclass and RMC project. + +RMC feature supports special customizations cannot be covered by conventional +auto-detection features based on probing a hardware module because they happen +at a board or a product level. For example: + - tty console for kernel log output in kernel cmdline + - default audio route configuration + - network configuration + - UI layout + - requirement to software driven by a mechanical design + - or static configuration bits for a physical bus that doesn't support to + identify devices or their presence at runtime + +An image with the feature has ability to configure supported boards with data +associated only to a type of board to get full functionality of the target at +runtime, yet still with a single image. + +Effect after installation is identical to what a conventional image specially +customized for a type of board (depending on the way to deploy image). + +Main functions of RMC Feature: + +Show board-specific boot entries in boot menu and boot system with configuration +(boot title, boot options, etc) in a selected boot entry. + +Support a "global" kernel boot command line fragment which is effective for all +boot entries. + +Deploy file blobs and create directories specific to the type of running board. + +Beside from this document, you can also find several built-in examples in +common/recipes-bsp/rmc/boards/. Refer to "Examples" section. + +You can also add new board types in your layer via a simple variable. + + + +Usage +-------------------------------------------------------------------------------- +Developers are suggested to organize all board-specific files in their own layer +following this example, so that RMC recipes can pick up them correctly in build. + +- my_top_dir/ Top directory of your board (Note 0) + |- rmc-db.bbappend bbappend file to rmc-db recipe at a lower level + |- rmc/ + |- target_board_1/ subdirectory of a board. + | |- board1.fp fingerprint file must be provided (NOTE 1) + | |- BOOTENTRY.CONFIG optional config file for boot entries. (NOTE 2) + | |- INSTALLER.CONFIG optional config file for installer. (NOTE 3) + | |- POSTINSTALL.sh optional script hook for installer (NOTE 4) + | |- board_file_1 A file blob specific to the type of board + | |- board_file_2 An another file specific to the type of board + | |- ...more files + |- target_board_2/ subdirectory of another board. + |- board_2_v2.fp fingerprint file for board 2. + |- BOOTENTRY.CONFIG + |- INSTALLER.CONFIG + |- board_file_1 + |- ...more files + +Note 0: +Developers are expected to use variable RMC_BOARD_DATA_DIRS to specify data of +boards packed into RMC database file generated in a build. The default value of +the variable in meta-intel specifies a group of boards. They work as examples +and necessary quirks for these boards to function properly. Developers can +override, append to the default boards with data of their own boards in the +database file, or even disable the generation of the database file. + +For example, in your local.conf file: + +This line adds your boards along with the default boards into RMC database file, +assuming you have a directory named "rmc" which has a subdirectory for each +board: + +RMC_BOARD_DATA_DIRS_append = " /path_of/rmc" + +This line directs RMC to pack data of your boards only, without data of the +default boards in meta-intel: + +RMC_BOARD_DATA_DIRS = "/path_of/rmc" + +And this line disables database generation: + +RMC_BOARD_DATA_DIRS = "" + +Please also refer to the "Example 1" in this document. + +Subdirectory is not supported in a board's directory. + +Note 1: +Fingerprint files must be provided and with ".fp" at the end of their names. +Fingerprint can be obtained by running RMC tool on your board. An easy way is to +live-boot USB stick flashed with any image enabled this feature on your board, +then run this command: + +# rmc -F -o my_board.fp + +Or you will need to build RMC tool for the architecture of your board, 32 or +64 bit x86, from RMC project. + +You can run RMC tool without any argument to get usage and examples. + +DO NOT NAME ANY FILE ENDING WITH '.fp' IF IT IS NOT A RMC FINGERPRINT FILE. + +If you do need a .fp file deployed onto target, please rename it in source and +specify the real name of file on target in INSTALLER.CONFIG. + +Note 2: +At runtime, RMC bootloader tries to fetch this file specific to the board at run +time, then tries to fetch each boot entry file specified in BOOTENTRY.CONFIG and +show them in boot menu options. The format of this file is very simple. Each +line is the name of a boot entry file: + +boot.conf +Install.conf +myrmcboot.conf + +Name of a boot entry file is defined by developer so it can be anything. But the +name of config file is what RMC bootloader looks up in RMC database, so it must +be named BOOTENTRY.CONFIG. + +Bootloader skips loading entry conf files from disk once any entry is loaded +from RMC database. + +Note 3: +At runtime, RMC installer tries to fetch INSTALLER.CONFIG file specific to the +board, then tries to fetch each file specified in this config file, and then +deploy the file onto target with its permissions, UID, GID and other attributes +also specified in this config file if file for the board can be retrieved from +RMC database. The format of this file is (# is for comment line) + +# name:uid:gid:mode:path_on_target +# to create a directory, add a “/†at the end of path_on_target: +audio_policy:0:0:600:/etc/audio/ +audio_def_policy:0:0:600:/etc/audio/audio_policy + +The above example creates /etc/audio directory first, then fetch a file named +“audio_def_policy†from RMC database for the board, then copy it to /etc/audio/ +with a new name “audio_policyâ€. + +If this config file is not provided, No data in RMC database is deployed to the +target. + +Some steps defined by developers could not be supported on a filesystem. +Installer simply ignores any errors in RMC deployment stage. + +The name of this config file is what installer looks up first, so it must be +INSTALLER.CONFIG. + +Note 4: +At the end of RMC deployment during installation, RMC installer queries a script +file POSTINSTALL.sh from RMC database file, and execute it when query is +successful on the running board. This hook provides developers almost ultimate +flexibility to retouch what have been deployed on the target. There are some +steps still can override results from this hook for boot entries and KBOOTPARAM. + + + +Enable RMC Feature +-------------------------------------------------------------------------------- +To enable the RMC feature please add the following variables to your local.conf. + +DISTRO_FEATURES_append = " rmc" +EFI_PROVIDER = "rmc-boot" + +The default EFI bootloader used with RMC is systemd-boot. To change the default +bootloader please overwrite the RMC_BOOTLOADER variable in your local.conf + +Note: +Image could be still bootable if you only have either of two lines, but RMC +feature could not be fully functional, depending on the availability of the +database file, installer and the rmc tool. + +Examples +-------------------------------------------------------------------------------- +We checked in configuration data in common/recipes-bsp/rmc/boards/ for several +boards, to help users to understand the RMC feature. These examples are also for +validation. For any example you find not working as what this section depicts, +it should be treated as a bug to be fixed. + +To test this feature with examples, enable it and build an image first, then +boot the built image on supported boards. Examples are always built in when the +feature is enabled, except for the EXAMPLE 1. + +EXAMPLE 1: Support a new board type: +(1) enable the feature and do a build to get a live-boot image by adding these + lines in conf/local.conf: + DISTRO_FEATURES_append = " rmc" + EFI_PROVIDER = "rmc-boot" + +(2) flash the image to a USB stick and boot it on your board + +(3) in super user mode, run "rmc -F -o my_board.fp" + +(4) create directories in your host "mkdir -p my_top_dir/my_rmc/my_board" + +(5) copy my_board.fp from target to my_top_dir/my_rmc/my_board/ on host + +(6) create a file my_top_dir/my_rmc/my_board/KBOOTPARAM, put some fake + and harmless options in a single line, say, "loglevel=7" + +(7) create a file my_top_dir/rmc-db.bbappend, put this single line in it: + RMC_BOARD_DATA_DIRS_append := " ${THISDIR}/my_rmc" + From parent directory of my_top_dir, the tree should look like: + my_top_dir/ + my_rmc/ + my_board/ + KBOOTPARAM + my_board.fp + rmc-db.bbappend + Later, you can add more board directories in my_rmc directory. + +(8) modify build configuration to add my_top_dir into build, for example, put + this line in a bblayers.conf: + BBFILES += "/full/path/of/my_top_dir/rmc-db.bbappend" + +(9) build image again then boot it on your board + +(10) Once you login to shell, new options should be effective, run this command + "cat /proc/cmdline" to verify the result. + +EXAMPLE 2: Board-specific boot entry +MinnowBoard MAX and B3 version: +common/recipes-bsp/rmc/boards/minnowmax +common/recipes-bsp/rmc/boards/minnowmaxB3 + +We have found two identities (type of board) exist for the "same" Minnow Max +hardware, so they have to be treated as two different types of hardware. The two +examples show you a boot entry specific to a type of board. Titles shown in boot +menu have different names according to the type of running board, "Minnow Max +boot" or "Minnow Max B3 boot". in /proc/cmdline, "console=ttyS0,115200n8" shall +be there. Kernel prints logs from 6-pin FTDI serial port on Minnow Max(s). This +console setting is in board-specific entries, so you won't see it effective if +you select default "boot" entry to boot the device. + +EXAMPLE 3: Board-specific boot entry, global kernel cmdline and installer +NUC Gen 6: +common/recipes-bsp/rmc/boards/nucgen6 +This is a combo example with all supported configuration data for NUC Gen 6 +product. It shows two boot entries in bootloader menu when you boot image on NUC +Gen 6 product, with "NUC Gen6" in entry titles. There shall no any "console=" in +/proc/cmdline when you boot with either of two "NUC Gen6"entries. We designed it +this way because there is no accessible tty port on NUC Gen 6 with housing. The +post-install hook is also provided in this example. + +This example also includes a global kernel cmdline fragment KBOOTPARAM. Content +of KBOOTPARAM shall be at the end of /proc/cmdline no matter which boot entry +you selected to boot NUC Gen6. + +INSTALLER.CONFIG directs installer to create a directory and deploy a file in it +when install the image on NUC Gen6. + +Choose "NUC Gen6 install" boot entry to boot shall start installation. Once +the device reboots after installation, we can verify the configurations. + +The boot entry "NUC Gen6 boot" shall be shown in boot menu. + +The content of KBOOTPARAM shall be in /proc/cmdline too. + +A directory /etc/mylib/ is created and a file "mylib.conf" is there. The content +of that file shall be what we put in mylib.conf in +common/recipes-bsp/rmc/boards/nucgen6 + +POSTINSTALL.sh shows how we get rid of an error message caused by no serial +console available on NUC Gen 6, without creating another static board +configuration. + +EXAMPLE 4: For validation only +T100 (32bit): +common/recipes-bsp/rmc/boards/T100-32bit +This example is provided for validation on 32 bit X86 architecture. It doesn't +provide any new function not mentioned in above examples. + +EXAMPLE 5: RMC for quark +Galileo Gen 2 +common/recipes-bsp/rmc/boards/Galileo2 +This example doesn't show any feature not covered in the above examples. Note +RMC only supports hddimg image format so far. Please refer to the section II.c +in README in meta-intel for how to boot Galileo with images in hddimg format. +Bootloader should show a board-specific boot option "Galileo Gen 2 boot" when +the board boots off. + +Troubleshooting +-------------------------------------------------------------------------------- +Issue: Cannot obtain RMC fingerprint for a board + +RMC tool requires UEFI BIOS and SMBIOS support in firmware. It doesn't support +other type of firmware, e.g. legacy BIOS. It also requires EFI driver enabled +in Linux kernel. + +Issue: Configuration for a board seems not effective at runtime. + +Check if board is booted from the storage where the image or installation lives +when you have multiple boot options in BIOS. On some old hardwares it is not +that obvious as you assume. A build image can support boot from both of legacy +and UEFI mode, but RMC only works with UEFI boot so far. + +Make sure configuration files (BOOTENTRY.CONFIG, INSTALLER.CONFIG and, +KBOOTPARAM ...) are properly named in the board directory. + +Make sure configuration files have correct contents. + +Some file attributes could not be supported by targeted file system. Installer +cannot setup file blobs as you wish. It simply move to the next step if a step +fails. + +Kernel command line can be customized globally with KBOOTPARAM or just in a boot +entry for the type of board. They have different effective scopes. + +If no any board-specific configuration becomes effective on your board but it +works on other boards of same product, you can run rmc tool to obtain +fingerprint file on your board and compare it with fingerprint of a working +board. It is possible they have different firmware versions and unluckily, some +information for fingerprint changes between two versions. You can update BIOS +on every board to the same BIOS version if it is feasible. Otherwise you have +to treat them as two different type of boards. We could extend rmc design to +allow multiple fingerprints in a board directory as a workaround. + +Issue: RMC reports error because it cannot find fingerprint when building image. + +Make sure you have a fingerprint file. Its name must be ended with '.fp'. You +can put a fingerprint file in a board directory and provide data later. + +Issue: Any problems the above troubleshooting cannot help + +Please report it to us. Extra information like the type of your board or a dump +file from dmidecode tool is helpful. We will investigate the problem and keep +improving this feature. + + + + +When you (don't) need RMC feature +-------------------------------------------------------------------------------- +RMC feature is designed to as generic as possible, in order to support a large +number of types of boards. And it shall be designed not to break things when it +is disabled. These considerations help users to decide if they really need or +enable it. + +If you are satisfied with a dedicated build target and image for each board in +your development cycle (source, build, validation, release, etc), you don't need +this feature. + +If you have a generic build for multiple type of boards and features supported +by that build meet your needs to functionality on all of boards, you don't need +to have this feature or you can disable it until you need to check in the first +board's data, in order to apply a quirk or customization only for that board. + +If you want this feature but have concerns to see more and more boards' finger- +prints and data in a generic project, you can have another layer to hold all of +board-specific data to split them from a generic layer at source level. Another +suggestion is always seeking chances not to clone or copy a common configuration +to each board's directory. + + + +Thanks + +Jianxun Zhang <jianxun.zhang@linux.intel.com> diff --git a/lib/oeqa/selftest/cases/secureboot.py b/lib/oeqa/selftest/cases/secureboot.py new file mode 100644 index 00000000..4c059e25 --- /dev/null +++ b/lib/oeqa/selftest/cases/secureboot.py @@ -0,0 +1,176 @@ +#!/usr/bin/env python +# ex:ts=4:sw=4:sts=4:et +# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- +# +# Copyright (c) 2017, Intel Corporation. +# All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# AUTHORS +# Mikko Ylinen <mikko.ylinen@linux.intel.com> +# +# Based on meta/lib/oeqa/selftest/* and meta-refkit/lib/oeqa/selftest/* + +"""Test cases for secure boot with QEMU running OVMF.""" + +import os +import unittest +import re +import glob +from shutil import rmtree, copy + +from oeqa.core.decorator.depends import OETestDepends +from oeqa.selftest.case import OESelftestTestCase +from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars, runqemu + +class SecureBootTests(OESelftestTestCase): + """Secure Boot test class.""" + + ovmf_keys_enrolled = False + ovmf_qemuparams = '' + ovmf_dir = '' + test_image_unsigned = 'secureboot-selftest-image-unsigned' + test_image_signed = 'secureboot-selftest-image-signed' + correct_key = 'refkit-db' + incorrect_key = 'incorrect' + + @classmethod + def setUpLocal(self): + + if not SecureBootTests.ovmf_keys_enrolled: + bitbake('ovmf ovmf-shell-image-enrollkeys', output_log=self.logger) + + bb_vars = get_bb_vars(['TMPDIR', 'DEPLOY_DIR_IMAGE']) + + SecureBootTests.ovmf_dir = os.path.join(bb_vars['TMPDIR'], 'oeselftest', 'secureboot', 'ovmf') + bb.utils.mkdirhier(SecureBootTests.ovmf_dir) + + # Copy (all) OVMF in a temporary location + for src in glob.glob('%s/ovmf.*' % bb_vars['DEPLOY_DIR_IMAGE']): + copy(src, SecureBootTests.ovmf_dir) + + SecureBootTests.ovmf_qemuparams = '-drive if=pflash,format=qcow2,file=%s/ovmf.secboot.qcow2' % SecureBootTests.ovmf_dir + + cmd = ("runqemu " + "qemuparams='%s' " + "ovmf-shell-image-enrollkeys wic intel-corei7-64 " + "nographic slirp") % SecureBootTests.ovmf_qemuparams + print('Running "%s"' % cmd) + status = runCmd(cmd) + + if not re.search('info: success', status.output, re.M): + self.fail('Failed to enroll keys. EFI shell log:\n%s' % status.output) + else: + # keys enrolled in ovmf.secboot.vars + SecureBootTests.ovmf_keys_enrolled = True + + @classmethod + def tearDownLocal(self): + # Seems this is mandatory between the tests (a signed image is booted + # when running test_boot_unsigned_image after test_boot_signed_image). + # bitbake('-c clean %s' % test_image, output_log=self.logger) + # + # Whatever the problem was, it no longer seems to be necessary, so + # we can skip the time-consuming clean + full rebuild (5:04 min instead + # of 6:55min here). + pass + + @classmethod + def tearDownClass(self): + bitbake('ovmf-shell-image-enrollkeys:do_cleanall', output_log=self.logger) + rmtree(self.ovmf_dir, ignore_errors=True) + + def secureboot_with_image(self, boot_timeout=300, signing_key=None): + """Boot the image with UEFI SecureBoot enabled and see the result. """ + + config = "" + + if signing_key: + test_image = self.test_image_signed + config += 'SECURE_BOOT_SIGNING_KEY = "${THISDIR}/files/%s.key"\n' % signing_key + config += 'SECURE_BOOT_SIGNING_CERT = "${THISDIR}/files/%s.crt"\n' % signing_key + else: + test_image = self.test_image_unsigned + + self.write_config(config) + bitbake(test_image, output_log=self.logger) + self.remove_config(config) + + # Some of the cases depend on the timeout to expire. Allow overrides + # so that we don't have to wait 1000s which is the default. + overrides = { + 'TEST_QEMUBOOT_TIMEOUT': boot_timeout, + } + + print('Booting %s' % test_image) + + try: + with runqemu(test_image, ssh=False, + runqemuparams='nographic slirp', + qemuparams=self.ovmf_qemuparams, + overrides=overrides, + image_fstype='wic') as qemu: + + cmd = 'uname -a' + + status, output = qemu.run_serial(cmd) + + self.assertTrue(status, 'Could not run \'uname -a\' (status=%s):\n%s' % (status, output)) + + # if we got this far without a correctly signed image, something went wrong + if signing_key != self.correct_key: + self.fail('The image not give a Security violation when expected. Boot log:\n%s' % output) + + + except Exception: + + # Currently runqemu() fails if 'login:' prompt is not seen and it's + # not possible to login as 'root'. Those conditions aren't met when + # booting to EFI shell (See [YOCTO #11438]). We catch the failure + # and parse the boot log to determine the success. Note: the + # timeout triggers verbose bb.error() but that's normal with some + # of the test cases. + + workdir = get_bb_var('WORKDIR', test_image) + bootlog = "%s/testimage/qemu_boot_log" % workdir + + with open(bootlog, "r") as log: + + # This isn't right but all we can do at this point. The right + # approach would run commands in the EFI shell to determine + # the BIOS rejects unsigned and/or images signed with keys in + # dbx key store but that needs changes in oeqa framework. + + output = log.read() + + # PASS if we see a security violation on unsigned or incorrectly signed images, otherwise fail + if signing_key == self.correct_key: + self.fail('Correctly signed image failed to boot. Boot log:\n%s' % output) + elif not re.search('Security Violation', output): + self.fail('The image not give a Security violation when expected. Boot log:\n%s' % output) + + def test_boot_unsigned_image(self): + """ Boot unsigned image with secureboot enabled in UEFI.""" + self.secureboot_with_image(boot_timeout=120, signing_key=None) + + @OETestDepends(['secureboot.SecureBootTests.test_boot_unsigned_image']) + def test_boot_incorrectly_signed_image(self): + """ Boot (correctly) signed image with secureboot enabled in UEFI.""" + self.secureboot_with_image(boot_timeout=120, signing_key=self.incorrect_key) + + @OETestDepends(['secureboot.SecureBootTests.test_boot_incorrectly_signed_image']) + def test_boot_correctly_signed_image(self): + """ Boot (correctly) signed image with secureboot enabled in UEFI.""" + self.secureboot_with_image(boot_timeout=150, signing_key=self.correct_key) diff --git a/meta-dpdk/COPYING.MIT b/meta-dpdk/COPYING.MIT new file mode 100644 index 00000000..fb950dc6 --- /dev/null +++ b/meta-dpdk/COPYING.MIT @@ -0,0 +1,17 @@ +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/meta-dpdk/LICENSE b/meta-dpdk/LICENSE new file mode 100644 index 00000000..e57d3b90 --- /dev/null +++ b/meta-dpdk/LICENSE @@ -0,0 +1,5 @@ +All metadata files (including, but not limited to bb, bbappend, +bbclass, inc and conf files) are MIT licensed unless otherwise stated. +Source code included in tree for individual recipes is under the +LICENSE stated in the associated recipe (.bb file) unless otherwise +stated. diff --git a/meta-dpdk/README b/meta-dpdk/README new file mode 100644 index 00000000..6563ff9f --- /dev/null +++ b/meta-dpdk/README @@ -0,0 +1,85 @@ +meta-dpdk +========= + +This README file contains information on building and booting +meta-intel BSP layers. Please see the corresponding sections below +for details. + + +Yocto Project Compatible +======================== + +The BSPs contained in this layer are compatible with the Yocto Project +as per the requirements listed here: + + https://www.yoctoproject.org/webform/yocto-project-compatible-registration + + +Dependencies +============ + +This layer depends on: + + URI: git://git.openembedded.org/bitbake + branch: 1.34 + + URI: git://git.openembedded.org/openembedded-core + layers: meta + branch: rocko + + +Guidelines for submitting patches +==================================== + +Please submit any patches against meta-dpdk to the meta-intel +mailing list (meta-intel@yoctoproject.org). Also, if your patches are +available via a public git repository, please also include a URL to +the repo and branch containing your patches as that makes it easier +for maintainers to grab and test your patches. + +There are patch submission scripts available that will, among other +things, automatically include the repo URL and branch as mentioned. +Please see the Yocto Project Development Manual sections entitled +'Using Scripts to Push a Change Upstream and Request a Pull' and +'Using Email to Submit a Patch' for details. + +Regardless of how you submit a patch or patchset, the patches should +at minimum follow the suggestions outlined in the 'Submitting a Change +to the Yocto Project' section in the Yocto Project Development Manual. +Specifically, they should: + + - Include a 'Signed-off-by:' line. A commit can't legally be pulled + in without this. + + - Provide a single-line, short summary of the change. This short + description should be prefixed by the BSP or recipe name, as + appropriate, followed by a colon. Capitalize the first character + of the summary (following the colon). + + - For the body of the commit message, provide detailed information + that describes what you changed, why you made the change, and the + approach you used. + + - If the change addresses a specific bug or issue that is associated + with a bug-tracking ID, include a reference to that ID in your + detailed description in the following format: [YOCTO #<bug-id>]. + + - Pay attention to line length - please don't allow any particular + line in the commit message to stretch past 72 characters. + + - For any non-trivial patch, provide information about how you + tested the patch, and for any non-trivial or non-obvious testing + setup, provide details of that setup. + +Doing a quick 'git log' in meta-intel will provide you with many +examples of good example commits if you have questions about any +aspect of the preferred format. + +The meta-intel maintainers will do their best to review and/or pull in +a patch or patchset within 24 hours of the time it was posted. For +larger and/or more involved patches and patchsets, the review process +may take longer. + +Please see the meta-intel/MAINTAINERS file for the list of maintainers +and their specific areas; it's also a good idea to cc: the specific +maintainer, if applicable. diff --git a/meta-dpdk/conf/include/maintainers.inc b/meta-dpdk/conf/include/maintainers.inc new file mode 100644 index 00000000..b1499f6c --- /dev/null +++ b/meta-dpdk/conf/include/maintainers.inc @@ -0,0 +1,4 @@ +# This file contains a list of recipe maintainers for meta-intel + +RECIPE_MAINTAINER_pn-dpdk = "TBD DPDK Flex Team" +RECIPE_MAINTAINER_pn-dpdk-dev-libibverbs = "TBD DPDK Flex Team" diff --git a/meta-dpdk/conf/layer.conf b/meta-dpdk/conf/layer.conf new file mode 100644 index 00000000..61331edc --- /dev/null +++ b/meta-dpdk/conf/layer.conf @@ -0,0 +1,19 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "dpdk" +BBFILE_PATTERN_dpdk := "^${LAYERDIR}/" +BBFILE_PRIORITY_dpdk = "5" + +LAYERDEPENDS_dpdk = "core" + +# This should only be incremented on significant changes that will +# cause compatibility issues with other layers +LAYERVERSION_dpdk = "1" +LAYERSERIES_COMPAT_dpdk = "rocko" + +require ${LAYERDIR}/conf/include/maintainers.inc diff --git a/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/dpdk-dev-libibverbs_1.2.1-3.4-2.0.0.0.bb b/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/dpdk-dev-libibverbs_1.2.1-3.4-2.0.0.0.bb new file mode 100644 index 00000000..e40c63b8 --- /dev/null +++ b/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/dpdk-dev-libibverbs_1.2.1-3.4-2.0.0.0.bb @@ -0,0 +1,27 @@ +DESCRIPTION = "libibverbs library to support Mellanox config" +HOMEPAGE = "https://github.com/Mellanox/dpdk-dev-libibverbs" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=7c557f27dd795ba77cc419dddc656b51" + +SRC_URI = "https://github.com/Mellanox/dpdk-dev-libibverbs/archive/libibverbs-${PV}.tar.gz;name=${PN} \ + file://init_c.patch \ + file://0001-Fix-build-with-clang.patch \ + file://0002-typecast-enum-to-int-before-comparison.patch \ + file://0003-initialize-use_config_mr.patch \ + file://0004-Fix-clang-warnings.patch \ + " + +SRC_URI[dpdk-dev-libibverbs.md5sum] = "65234ee278eb437a7069326f37cd4d86" +SRC_URI[dpdk-dev-libibverbs.sha256sum] = "a6471515556cb8d10ad471bb7efb8cf760b248a28aceb57d4534d50d572f56cd" + +# A machine needs to enable this using: +# COMPATIBLE_MACHINE_pn-dpdk-dev-libibverbs = "<machine name>" + +COMPATIBLE_MACHINE = "null" +COMPATIBLE_HOST_libc-musl_class-target = "null" + +S = "${WORKDIR}/${PN}-libibverbs-${PV}" +COMPATIBLE_HOST = '(i.86|x86_64).*-linux' +DEPENDS = "libnl" + +inherit pkgconfig autotools diff --git a/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0001-Fix-build-with-clang.patch b/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0001-Fix-build-with-clang.patch new file mode 100644 index 00000000..93d8aba6 --- /dev/null +++ b/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0001-Fix-build-with-clang.patch @@ -0,0 +1,32 @@ +From b705caef6c717adc80585843b7fcc68700ced4b6 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 12 Aug 2017 09:25:24 -0700 +Subject: [PATCH 1/4] Fix build with clang + +Fix +error: logical not is only applied to the left hand side of this bitwise operator [-Werror,-Wlogical-not-parentheses] + if ((!port_attr->comp_mask & IBV_EXP_QUERY_PORT_ATTR_MASK1) || + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + include/infiniband/verbs_exp.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/infiniband/verbs_exp.h b/include/infiniband/verbs_exp.h +index ae94deb..42ed83d 100644 +--- a/include/infiniband/verbs_exp.h ++++ b/include/infiniband/verbs_exp.h +@@ -2955,7 +2955,7 @@ static inline int ibv_exp_query_port(struct ibv_context *context, + &port_attr->port_attr); + + /* Check that only valid flags were given */ +- if ((!port_attr->comp_mask & IBV_EXP_QUERY_PORT_ATTR_MASK1) || ++ if (!(port_attr->comp_mask & IBV_EXP_QUERY_PORT_ATTR_MASK1) || + (port_attr->comp_mask & ~IBV_EXP_QUERY_PORT_ATTR_MASKS) || + (port_attr->mask1 & ~IBV_EXP_QUERY_PORT_MASK)) { + errno = EINVAL; +-- +2.14.1 + diff --git a/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0002-typecast-enum-to-int-before-comparison.patch b/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0002-typecast-enum-to-int-before-comparison.patch new file mode 100644 index 00000000..00516eba --- /dev/null +++ b/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0002-typecast-enum-to-int-before-comparison.patch @@ -0,0 +1,115 @@ +From 7edab012f2d28de7e6d3657ec698e1090d0112de Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 12 Aug 2017 09:25:49 -0700 +Subject: [PATCH 2/4] typecast enum to int before comparison + +Fix +error: comparison of unsigned enum expression < 0 is always false [-Werror,-Wtautological-compare] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + examples/cc_pingpong.c | 2 +- + examples/rc_pingpong.c | 2 +- + examples/srq_pingpong.c | 2 +- + examples/task_pingpong.c | 2 +- + examples/uc_pingpong.c | 2 +- + examples/umr_rc.c | 2 +- + examples/xsrq_pingpong.c | 2 +- + 7 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/examples/cc_pingpong.c b/examples/cc_pingpong.c +index 7b3e397..567c503 100644 +--- a/examples/cc_pingpong.c ++++ b/examples/cc_pingpong.c +@@ -1408,7 +1408,7 @@ int main(int argc, char *argv[]) + + case 'm': + mtu = pp_mtu_to_enum(strtol(optarg, NULL, 0)); +- if (mtu < 0) { ++ if ((int)mtu < 0) { + usage(argv[0]); + return 1; + } +diff --git a/examples/rc_pingpong.c b/examples/rc_pingpong.c +index 786577e..e661368 100644 +--- a/examples/rc_pingpong.c ++++ b/examples/rc_pingpong.c +@@ -759,7 +759,7 @@ int main(int argc, char *argv[]) + + case 'm': + mtu = pp_mtu_to_enum(strtol(optarg, NULL, 0)); +- if (mtu < 0) { ++ if ((int)mtu < 0) { + usage(argv[0]); + return 1; + } +diff --git a/examples/srq_pingpong.c b/examples/srq_pingpong.c +index 9762866..f85a7cd 100644 +--- a/examples/srq_pingpong.c ++++ b/examples/srq_pingpong.c +@@ -697,7 +697,7 @@ int main(int argc, char *argv[]) + + case 'm': + mtu = pp_mtu_to_enum(strtol(optarg, NULL, 0)); +- if (mtu < 0) { ++ if ((int)mtu < 0) { + usage(argv[0]); + return 1; + } +diff --git a/examples/task_pingpong.c b/examples/task_pingpong.c +index 748f8bb..d03a8b2 100644 +--- a/examples/task_pingpong.c ++++ b/examples/task_pingpong.c +@@ -1005,7 +1005,7 @@ int main(int argc, char *argv[]) + + case 'm': + mtu = pp_mtu_to_enum(strtol(optarg, NULL, 0)); +- if (mtu < 0) { ++ if ((int)mtu < 0) { + usage(argv[0]); + return 1; + } +diff --git a/examples/uc_pingpong.c b/examples/uc_pingpong.c +index 879bd77..a38a054 100644 +--- a/examples/uc_pingpong.c ++++ b/examples/uc_pingpong.c +@@ -606,7 +606,7 @@ int main(int argc, char *argv[]) + + case 'm': + mtu = pp_mtu_to_enum(strtol(optarg, NULL, 0)); +- if (mtu < 0) { ++ if ((int)mtu < 0) { + usage(argv[0]); + return 1; + } +diff --git a/examples/umr_rc.c b/examples/umr_rc.c +index ab76d3c..0ec636a 100644 +--- a/examples/umr_rc.c ++++ b/examples/umr_rc.c +@@ -950,7 +950,7 @@ int main(int argc, char *argv[]) + + case 'm': + mtu = pp_mtu_to_enum(strtol(optarg, NULL, 0)); +- if (mtu < 0) { ++ if ((int)mtu < 0) { + usage(argv[0]); + return 1; + } +diff --git a/examples/xsrq_pingpong.c b/examples/xsrq_pingpong.c +index c4ae51d..cebae5d 100644 +--- a/examples/xsrq_pingpong.c ++++ b/examples/xsrq_pingpong.c +@@ -910,7 +910,7 @@ int main(int argc, char *argv[]) + break; + case 'm': + ctx.mtu = pp_mtu_to_enum(strtol(optarg, NULL, 0)); +- if (ctx.mtu < 0) { ++ if ((int)ctx.mtu < 0) { + usage(argv[0]); + return 1; + } +-- +2.14.1 + diff --git a/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0003-initialize-use_config_mr.patch b/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0003-initialize-use_config_mr.patch new file mode 100644 index 00000000..da4ef15b --- /dev/null +++ b/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0003-initialize-use_config_mr.patch @@ -0,0 +1,31 @@ +From 936da7fcab06ff3bc7c1c1e1ab108a36797da039 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 12 Aug 2017 09:28:00 -0700 +Subject: [PATCH 3/4] initialize use_config_mr + +Fixes +error: variable 'use_contig_mr' is uninitialized when used here [-Werror,-Wuninitialized] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + examples/dcini.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/examples/dcini.c b/examples/dcini.c +index 001e905..08d75ec 100644 +--- a/examples/dcini.c ++++ b/examples/dcini.c +@@ -269,7 +269,7 @@ int main(int argc, char *argv[]) + int size = 4096; + int iters = 1000; + int use_event = 0; +- int use_contig_mr; ++ int use_contig_mr = 0; + int err; + struct ibv_ah_attr ah_attr; + struct dc_ctx ctx = { +-- +2.14.1 + diff --git a/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0004-Fix-clang-warnings.patch b/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0004-Fix-clang-warnings.patch new file mode 100644 index 00000000..26f09e54 --- /dev/null +++ b/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/0004-Fix-clang-warnings.patch @@ -0,0 +1,56 @@ +From 08944074f9d9525a57e88a4990dd833d0999b8df Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 12 Aug 2017 09:36:55 -0700 +Subject: [PATCH 4/4] Fix clang warnings + +../../../../../../../workspace/sources/dpdk-dev-libibverbs/examples/intf.c:1221:11: error: comparison of array 'ctx->dev_name' not equal to a null pointer is always true [-Werror,-Wtautological-pointer-compare] + if (ctx->dev_name != NULL) { + ~~~~~^~~~~~~~ ~~~~ +../../../../../../../workspace/sources/dpdk-dev-libibverbs/examples/intf.c:1893:13: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare] + if (size < 0 || size > MAX_MSG_SIZE) + ~~~~ ^ ~ +../../../../../../../workspace/sources/dpdk-dev-libibverbs/examples/intf.c:1901:12: error: comparison of unsigned enum expression < 0 is always false [-Werror,-Wtautological-compare] + if (mtu < 0) + ~~~ ^ ~ + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + examples/intf.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/examples/intf.c b/examples/intf.c +index 8d158ee..1f1af50 100644 +--- a/examples/intf.c ++++ b/examples/intf.c +@@ -1218,7 +1218,7 @@ int create_resources(struct intf_context *ctx) + return 1; + } + +- if (!ctx->dev_name) { ++ if (!ctx->dev_name[0]) { + ctx->ib_dev = *dev_list; + if (!ctx->ib_dev) { + fprintf(stderr, "No IB devices found\n"); +@@ -1828,7 +1828,7 @@ int parse_input(struct intf_input *input, struct intf_input *default_input, int + char *ib_devname = NULL; + char *vrbs_intf = NULL; + char *cpus_str = NULL; +- unsigned long long size; ++ long long size; + + memcpy(input, default_input, sizeof(*input)); + +@@ -1898,7 +1898,7 @@ int parse_input(struct intf_input *input, struct intf_input *default_input, int + + case 'm': + mtu = mtu_to_enum(strtol(optarg, NULL, 0)); +- if (mtu < 0) ++ if ((int)mtu < 0) + goto print_usage; + input->ib_data.mtu = mtu; + break; +-- +2.14.1 + diff --git a/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/init_c.patch b/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/init_c.patch new file mode 100644 index 00000000..a7708d7c --- /dev/null +++ b/meta-dpdk/recipes-extended/dpdk-dev-libibverbs/files/init_c.patch @@ -0,0 +1,23 @@ +dpdk-dev-libibverbs: suppress gcc7 warnings + +We know that format-truncation in init.c is okay. + +Upstream-Status: Pending + +Signed-off-by: Joe Slater <joe.slater@windriver.com> + + +--- a/src/init.c ++++ b/src/init.c +@@ -31,6 +31,11 @@ + * SOFTWARE. + */ + ++/* For this file we know we can ignore this warning. */ ++#if __GNUC__ > 6 ++#pragma GCC diagnostic ignored "-Wformat-truncation" ++#endif ++ + #if HAVE_CONFIG_H + # include <config.h> + #endif /* HAVE_CONFIG_H */ diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk.inc b/meta-dpdk/recipes-extended/dpdk/dpdk.inc new file mode 100644 index 00000000..c1d01491 --- /dev/null +++ b/meta-dpdk/recipes-extended/dpdk/dpdk.inc @@ -0,0 +1,146 @@ +DESCRIPTION = "Intel(r) Data Plane Development Kit" +HOMEPAGE = "http://dpdk.org" +LICENSE = "BSD & LGPLv2 & GPLv2" +LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=751419260aa954499f7abaabaa882bbe" + +SRC_URI = "http://fast.dpdk.org/rel/${BP}.tar.gz;name=dpdk \ + file://dpdk-16.04-add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch \ + file://dpdk-16.07-add-sysroot-option-within-app-makefile.patch \ + file://dpdk-16.04-Fix-for-misleading-indentation-error.patch \ + file://dpdk-16.04-dpdk-fix-compilation-with-dynamic-libs.patch \ + file://dpdk-16.07-dpdk-fix-for-parellel-make-issue.patch \ + file://dpdk-17.02-dpdk-fix-installation-warning-and-issue.patch \ + " + +# A machine needs to enable this using: +# COMPATIBLE_MACHINE_pn-dpdk-dev-libibverbs = "<machine name>" + +COMPATIBLE_MACHINE = "null" +COMPATIBLE_HOST_libc-musl_class-target = "null" + + +# dpdk example apps dpdk_qat and vhost have dependancy on fuse and qat. +# fuse is in meta-filesystems and qat is not yet upstreamed. +# So adding mechanism to explicitly disable the use of fuse and qat. +# To enable, uncomment the below line or include in .bbappend. +# PACKAGECONFIG ?= " dpdk_qat vhost libvirt" + +PACKAGECONFIG[dpdk_qat] = ",,virtual/qat" +PACKAGECONFIG[vhost] = ",,fuse" +PACKAGECONFIG[libvirt] = ",,libvirt" + +export CONFIG_EXAMPLE_DPDK_QAT = "${@bb.utils.contains('PACKAGECONFIG', 'dpdk_qat', 'y', 'n', d)}" +export CONFIG_EXAMPLE_VM_POWER_MANAGER = "${@bb.utils.contains('PACKAGECONFIG', 'libvirt', 'y', 'n', d)}" +export CONFIG_VHOST_ENABLED = "${@bb.utils.contains('PACKAGECONFIG', 'vhost', 'y', 'n', d)}" + +RDEPENDS_${PN} += "python-subprocess dpdk-dev-libibverbs" +DEPENDS = "virtual/kernel dpdk-dev-libibverbs" +do_configure[depends] += "virtual/kernel:do_shared_workdir" + +inherit module + +export MODULE_DIR="/lib/modules/${KERNEL_VERSION}/kernel/drivers/net" +export RTE_SDK = "${S}" +export RTE_TARGET="${@bb.utils.contains("TUNE_FEATURES", "m64", "x86_64-native-linuxapp-gcc", "i686-native-linuxapp-gcc", d)}" + +export ICP_ROOT = "${PKG_CONFIG_SYSROOT_DIR}/usr/include" +export ICP_LIB_ROOT= "${PKG_CONFIG_SYSROOT_DIR}/usr/lib" +export RTE_KERNELDIR = "${STAGING_KERNEL_DIR}" +export RTE_KERNELDIR_OUT = "${STAGING_KERNEL_BUILDDIR}" +export INSTALL_PATH = "${prefix}/share" +export RTE_OUTPUT = "${S}/${RTE_TARGET}" +export ETHTOOL_LIB_PATH = "${S}/examples/ethtool/lib/${RTE_TARGET}/" +export SYSROOTPATH = "--sysroot=${STAGING_DIR_HOST}" +export DPDK_TARGET_MACH = "${@get_dpdk_target_mach(bb,d)}" +export ICP_LAC_API_DIR = "${STAGING_DIR_TARGET}${includedir}/lac" + +# The list of intel Comms platforms and their target machine +# process mapping. The supported target machine is listed under +# dpdk/mk/machine +def get_dpdk_target_mach(bb, d): + target_arch = d.getVar('DPDK_TARGET_MACHINE', True) + if target_arch: + target_arch + return "default" + +do_configure () { + ############################################################# + ### default value for prefix is "usr", unsetting it, so it + ### will not be concatenated in ${RTE_TARGET}/Makefile + ### which will cause compilation failure + ############################################################# + unset prefix + + # Fix-up CONFIG_RTE_MACHINE based on target machine + sed -e "s#CONFIG_RTE_MACHINE=\"native\"#CONFIG_RTE_MACHINE=\"${DPDK_TARGET_MACH}\"#" -i ${S}/config/defconfig_x86_64-native-linuxapp-gcc + sed -e "s#CONFIG_RTE_MACHINE=\"native\"#CONFIG_RTE_MACHINE=\"${DPDK_TARGET_MACH}\"#" -i ${S}/config/defconfig_i686-native-linuxapp-gcc + + # Fix-up vhost configs based on package config + sed -e "s#CONFIG_RTE_KNI_VHOST=n#CONFIG_RTE_KNI_VHOST=${CONFIG_VHOST_ENABLED}#" -i ${S}/config/common_linuxapp + sed -e "s#CONFIG_RTE_KNI_VHOST_VNET_HDR_EN=n#CONFIG_RTE_KNI_VHOST_VNET_HDR_EN=${CONFIG_VHOST_ENABLED}#" -i ${S}/config/common_linuxapp + sed -e "s#CONFIG_RTE_LIBRTE_VHOST=n#CONFIG_RTE_LIBRTE_VHOST=${CONFIG_VHOST_ENABLED}#" -i ${S}/config/common_linuxapp + + make O=$RTE_TARGET T=$RTE_TARGET config +} + +do_compile () { + unset LDFLAGS TARGET_LDFLAGS BUILD_LDFLAGS + + cd ${S}/${RTE_TARGET} + oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu" \ + EXTRA_CFLAGS="--sysroot=${STAGING_DIR_HOST} -I${STAGING_INCDIR}" \ + CROSS="${TARGET_PREFIX}" \ + prefix="" LDFLAGS="" WERROR_FLAGS="-w" V=1 + + cd ${S}/examples/ + oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu -fuse-ld=bfd" \ + EXTRA_CFLAGS="--sysroot=${STAGING_DIR_HOST} -I${STAGING_INCDIR}" \ + CROSS="${TARGET_PREFIX}" O="${S}/examples/$@/" +} + +do_install () { + oe_runmake O=${RTE_OUTPUT} T= install-runtime DESTDIR=${D} + oe_runmake O=${RTE_OUTPUT} T= install-kmod DESTDIR=${D} kerneldir=${MODULE_DIR} + oe_runmake O=${RTE_OUTPUT} T= install-sdk DESTDIR=${D} + + # Install examples + for dirname in ${S}/examples/* + do + install -m 0755 -d ${D}/${INSTALL_PATH}/examples/`basename ${dirname}` + + for appname in `find ${dirname} -regex ".*${EXAMPLES_BUILD_DIR}\/app\/[-0-9a-zA-Z0-9/_]*$"` + do + install -m 755 ${appname} ${D}/${INSTALL_PATH}/examples/`basename ${dirname}`/ + done + done +} + +PACKAGES += "${PN}-examples" + +FILES_${PN}-dbg += " \ + ${INSTALL_PATH}/.debug \ + ${INSTALL_PATH}/examples/*/.debug \ + " + +FILES_${PN}-doc += "\ + ${INSTALL_PATH}/doc \ + " + +FILES_${PN}-dev += " \ + ${INSTALL_PATH}/${RTE_TARGET}/.config \ + ${includedir} \ + ${includedir}/${ARCHDIR} \ + ${includedir}/exec-env \ + ${INSTALL_PATH}/buildtools/ \ + ${INSTALL_PATH}/${RTE_TARGET}/include \ + ${INSTALL_PATH}/${RTE_TARGET}/lib \ + " + +FILES_${PN} += " ${INSTALL_PATH}/usertools/ \ + ${prefix}/sbin/ \ + ${prefix}/bin/ \ + ${libdir}/ \ + " +FILES_${PN}-examples += " \ + ${INSTALL_PATH}/examples/* \ + " diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk/0001-examples-Fix-maybe-uninitialized-warning.patch b/meta-dpdk/recipes-extended/dpdk/dpdk/0001-examples-Fix-maybe-uninitialized-warning.patch new file mode 100644 index 00000000..cc8041e7 --- /dev/null +++ b/meta-dpdk/recipes-extended/dpdk/dpdk/0001-examples-Fix-maybe-uninitialized-warning.patch @@ -0,0 +1,44 @@ +From 3924f5df5aca5ba23abbe9a84173280ede8be2dd Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 1 Aug 2017 20:18:46 -0700 +Subject: [PATCH] examples: Fix maybe-uninitialized warning + +Initialize arrays to 0, makes compiler happy about + +error: 'vals[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + examples/qos_sched/args.c | 2 +- + examples/vhost/virtio_net.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/examples/qos_sched/args.c b/examples/qos_sched/args.c +index 476a0ee..fd601c3 100644 +--- a/examples/qos_sched/args.c ++++ b/examples/qos_sched/args.c +@@ -241,7 +241,7 @@ static int + app_parse_flow_conf(const char *conf_str) + { + int ret; +- uint32_t vals[5]; ++ uint32_t vals[5] = {0}; + struct flow_conf *pconf; + uint64_t mask; + +diff --git a/examples/vhost/virtio_net.c b/examples/vhost/virtio_net.c +index cc2c3d8..16b5392 100644 +--- a/examples/vhost/virtio_net.c ++++ b/examples/vhost/virtio_net.c +@@ -327,7 +327,7 @@ vs_dequeue_pkts(struct vhost_dev *dev, uint16_t queue_id, + { + struct vhost_queue *queue; + struct rte_vhost_vring *vr; +- uint32_t desc_indexes[MAX_PKT_BURST]; ++ uint32_t desc_indexes[MAX_PKT_BURST] = {0}; + uint32_t used_idx; + uint32_t i = 0; + uint16_t free_entries; +-- +2.13.3 + diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.04-Fix-for-misleading-indentation-error.patch b/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.04-Fix-for-misleading-indentation-error.patch new file mode 100644 index 00000000..8786af7c --- /dev/null +++ b/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.04-Fix-for-misleading-indentation-error.patch @@ -0,0 +1,56 @@ +From 8cd0a16af531cca0af6b4f9b729c252b8bdbf8e2 Mon Sep 17 00:00:00 2001 +From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> +Date: Tue, 5 Jul 2016 00:05:25 +0800 +Subject: [PATCH] Fix for misleading indentation error + +fix the indentation of the code to match the block structure. This may cause +build errors if you have -Wall -Werror in your project. + +Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> +--- + lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c | 8 ++++---- + lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c | 2 +- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c +index df22470..ba28eba 100644 +--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c ++++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_phy.c +@@ -3302,8 +3302,8 @@ s32 e1000_read_phy_reg_mphy(struct e1000_hw *hw, u32 address, u32 *data) + /* Disable access to mPHY if it was originally disabled */ + if (locked) + ready = e1000_is_mphy_ready(hw); +- if (!ready) +- return -E1000_ERR_PHY; ++ if (!ready) ++ return -E1000_ERR_PHY; + E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTRL, + E1000_MPHY_DIS_ACCESS); + +@@ -3367,8 +3367,8 @@ s32 e1000_write_phy_reg_mphy(struct e1000_hw *hw, u32 address, u32 data, + /* Disable access to mPHY if it was originally disabled */ + if (locked) + ready = e1000_is_mphy_ready(hw); +- if (!ready) +- return -E1000_ERR_PHY; ++ if (!ready) ++ return -E1000_ERR_PHY; + E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTRL, + E1000_MPHY_DIS_ACCESS); + +diff --git a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c +index 017dfe1..7248a7e 100644 +--- a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c ++++ b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_82599.c +@@ -870,7 +870,7 @@ s32 ixgbe_setup_mac_link_82599(struct ixgbe_hw *hw, + if (speed & IXGBE_LINK_SPEED_10GB_FULL) + if (orig_autoc & IXGBE_AUTOC_KX4_SUPP) + autoc |= IXGBE_AUTOC_KX4_SUPP; +- if ((orig_autoc & IXGBE_AUTOC_KR_SUPP) && ++ if ((orig_autoc & IXGBE_AUTOC_KR_SUPP) && + (hw->phy.smart_speed_active == false)) + autoc |= IXGBE_AUTOC_KR_SUPP; + if (speed & IXGBE_LINK_SPEED_1GB_FULL) +-- +1.9.1 + diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.04-add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch b/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.04-add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch new file mode 100644 index 00000000..e446ce44 --- /dev/null +++ b/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.04-add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch @@ -0,0 +1,52 @@ +From 6c8d348190a8cf6c35111913cbf117ca98137e84 Mon Sep 17 00:00:00 2001 +From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> +Date: Fri, 18 Dec 2015 18:30:47 +0800 +Subject: [PATCH] dpdk v2.2.0: add RTE_KERNELDIR_OUT to split kernel build + artifact + +Introduce RTE_KERNELDIR_OUT to be the path to which kernel build +artifacts are located. This is for matching the workflow change +since Yocto Project v1.8 onwards whereby tmp/work-shared contains +separate directories for kernel source and kernel artifacts. + +Upstream-Status: Inappropriate [configuration] + +Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> +--- + mk/rte.module.mk | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/mk/rte.module.mk b/mk/rte.module.mk +index 53ed4fe..b7a014b 100644 +--- a/mk/rte.module.mk ++++ b/mk/rte.module.mk +@@ -77,7 +77,7 @@ build: _postbuild + # build module + $(MODULE).ko: $(SRCS_LINKS) + @if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi +- @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \ ++ @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \ + CC="$(KERNELCC)" CROSS_COMPILE=$(CROSS) V=$(if $V,1,0) + + # install module in $(RTE_OUTPUT)/kmod +@@ -88,7 +88,7 @@ $(RTE_OUTPUT)/kmod/$(MODULE).ko: $(MODULE).ko + + # install module + modules_install: +- @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) \ ++ @$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) \ + modules_install + + .PHONY: clean +@@ -98,7 +98,7 @@ clean: _postclean + .PHONY: doclean + doclean: + @if [ ! -f $(notdir Makefile) ]; then ln -nfs $(SRCDIR)/Makefile . ; fi +- $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR) clean ++ $(Q)$(MAKE) -C $(RTE_KERNELDIR) M=$(CURDIR) O=$(RTE_KERNELDIR_OUT) clean + @$(foreach FILE,$(SRCS-y) $(SRCS-n) $(SRCS-),\ + if [ -h $(notdir $(FILE)) ]; then rm -f $(notdir $(FILE)) ; fi ;) + @if [ -h $(notdir Makefile) ]; then rm -f $(notdir Makefile) ; fi +-- +1.9.1 + diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.04-dpdk-enable-ip_fragmentation-in-common_base-config.patch b/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.04-dpdk-enable-ip_fragmentation-in-common_base-config.patch new file mode 100644 index 00000000..3719aa78 --- /dev/null +++ b/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.04-dpdk-enable-ip_fragmentation-in-common_base-config.patch @@ -0,0 +1,33 @@ +From f7be643cc62860a986c9e0aec990c90bfc58a941 Mon Sep 17 00:00:00 2001 +From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> +Date: Fri, 1 Apr 2016 17:31:55 +0800 +Subject: [PATCH] dpdk: enable ip_fragmentation in common_base config + +Upstream-Status: Inappropriate [Configuration] + +This configuration need to set for ip_fragmentation application. + +Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> +--- + config/common_base | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/config/common_base b/config/common_base +index abd6a64..90259f0 100644 +--- a/config/common_base ++++ b/config/common_base +@@ -442,6 +442,11 @@ CONFIG_RTE_LIBRTE_POWER_DEBUG=n + CONFIG_RTE_MAX_LCORE_FREQS=64 + + # ++# Compile ip_fragmentation ++# ++CONFIG_RTE_IP_FRAG=y ++ ++# + # Compile librte_net + # + CONFIG_RTE_LIBRTE_NET=y +-- +1.9.1 + diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.04-dpdk-fix-compilation-with-dynamic-libs.patch b/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.04-dpdk-fix-compilation-with-dynamic-libs.patch new file mode 100644 index 00000000..4254d073 --- /dev/null +++ b/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.04-dpdk-fix-compilation-with-dynamic-libs.patch @@ -0,0 +1,30 @@ +From 8ce0e3249942a90f733bb2113e70e5a90ae67b00 Mon Sep 17 00:00:00 2001 +From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> +Date: Thu, 21 Jul 2016 05:53:52 +0800 +Subject: [PATCH 1/2] dpdk: fix compilation with dynamic libs + +Upstream-Status: Inappropriate [Configuration] + +Ensure that the correct cflags are being used. + +Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> +--- + mk/rte.lib.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk +index 8f7e021..42610c9 100644 +--- a/mk/rte.lib.mk ++++ b/mk/rte.lib.mk +@@ -70,7 +70,7 @@ exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1)))) + + ifeq ($(LINK_USING_CC),1) + # Override the definition of LD here, since we're linking with CC +-LD := $(CC) $(CPU_CFLAGS) ++LD := $(CC) $(CPU_CFLAGS) $(EXTRA_CFLAGS) + _CPU_LDFLAGS := $(call linkerprefix,$(CPU_LDFLAGS)) + override EXTRA_LDFLAGS := $(call linkerprefix,$(EXTRA_LDFLAGS)) + else +-- +1.9.1 + diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.07-add-sysroot-option-within-app-makefile.patch b/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.07-add-sysroot-option-within-app-makefile.patch new file mode 100644 index 00000000..a4c47112 --- /dev/null +++ b/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.07-add-sysroot-option-within-app-makefile.patch @@ -0,0 +1,32 @@ +From a33a9e7559b59bc5fb0988af85062436ec4389a4 Mon Sep 17 00:00:00 2001 +From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> +Date: Fri, 19 Aug 2016 11:57:49 +0800 +Subject: [PATCH] dpdk: add --sysroot option within app makefile + +Upstream-Status: Inappropriate [configuration] + +rte.app.mk has been changed to add -Wl, to all items listed +under EXTRA_LDFLAGS. It causes --sysroot=<path> to not setup +correctly when we depends on gcc to setup for GNU ld. + +Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> +--- + mk/rte.app.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mk/rte.app.mk b/mk/rte.app.mk +index eb28e11..296c8c7 100644 +--- a/mk/rte.app.mk ++++ b/mk/rte.app.mk +@@ -195,7 +195,7 @@ exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1)))) + ifeq ($(LINK_USING_CC),1) + O_TO_EXE = $(CC) -o $@ $(CFLAGS) $(OBJS-y) $(call linkerprefix, \ + $(LDLIBS) $(LDFLAGS) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) \ +- $(MAPFLAGS)) ++ $(MAPFLAGS)) $(SYSROOTPATH) + else + O_TO_EXE = $(LD) -o $@ $(OBJS-y) \ + $(LDLIBS) $(LDFLAGS) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) \ +-- +1.9.1 + diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.07-dpdk-fix-for-parellel-make-issue.patch b/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.07-dpdk-fix-for-parellel-make-issue.patch new file mode 100644 index 00000000..fc965fa4 --- /dev/null +++ b/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-16.07-dpdk-fix-for-parellel-make-issue.patch @@ -0,0 +1,42 @@ +From 4cdcb5ea4af9677677a007c4f9b286948123be87 Mon Sep 17 00:00:00 2001 +From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> +Date: Fri, 2 Sep 2016 15:48:52 +0800 +Subject: [PATCH] dpdk: fix for parellel make issue + +To make sure that the path of libraries should be correct and +libraries will be build before, And available at the time of +linking example apps. + +Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> +--- + examples/Makefile | 1 + + examples/ethtool/ethtool-app/Makefile | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/examples/Makefile b/examples/Makefile +index 18b41b9..c7c2beb 100644 +--- a/examples/Makefile ++++ b/examples/Makefile +@@ -43,6 +43,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) += distributor + DIRS-$(CONFIG_RTE_LIBRTE_PMD_BOND) += bond + DIRS-y += cmdline + DIRS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) += distributor ++DEPDIRS-y += examples/ethtool/lib + DIRS-y += ethtool + DIRS-y += exception_path + DIRS-y += helloworld +diff --git a/examples/ethtool/ethtool-app/Makefile b/examples/ethtool/ethtool-app/Makefile +index 09c66ad..ec068e6 100644 +--- a/examples/ethtool/ethtool-app/Makefile ++++ b/examples/ethtool/ethtool-app/Makefile +@@ -47,6 +47,7 @@ SRCS-y := main.c ethapp.c + CFLAGS += -O3 -D_GNU_SOURCE -pthread -I$(SRCDIR)/../lib + CFLAGS += $(WERROR_FLAGS) + ++LDLIBS += -L$(ETHTOOL_LIB_PATH)/ + LDLIBS += -L$(subst ethtool-app,lib,$(RTE_OUTPUT))/lib + LDLIBS += -lrte_ethtool + +-- +1.9.1 + diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-17.02-dpdk-fix-installation-warning-and-issue.patch b/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-17.02-dpdk-fix-installation-warning-and-issue.patch new file mode 100644 index 00000000..f5171674 --- /dev/null +++ b/meta-dpdk/recipes-extended/dpdk/dpdk/dpdk-17.02-dpdk-fix-installation-warning-and-issue.patch @@ -0,0 +1,81 @@ +From 363817bf84286fc167e0c3c255a7fd522bf87d8c Mon Sep 17 00:00:00 2001 +From: Shashwat Pandey <shashwatx.p@intel.com> +Date: Mon, 20 Feb 2017 15:46:22 +0800 +Subject: [PATCH] dpdk: fix installation warning and issue + +Upstream-Status: Inappropriate [configuration] + +Ensure that all compiled libs should be installed to correct location. +For cross compiling cp -r and extra tar flags used to avoid QA warning +[host-user-contaminated]. +Added excluded files from bin and removing mk and app/dpdk-pmdinfogen files +installation since it is not needed as a part of image. + +Signed-off-by: Shashwat Pandey <shashwatx.p@intel.com> +--- + mk/rte.sdkinstall.mk | 29 ++++++++++++++--------------- + 1 file changed, 14 insertions(+), 15 deletions(-) + +diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk +index dbac2a2..563954e 100644 +--- a/mk/rte.sdkinstall.mk ++++ b/mk/rte.sdkinstall.mk +@@ -115,16 +115,17 @@ endif + + install-runtime: + $(Q)$(call rte_mkdir, $(DESTDIR)$(libdir)) +- $(Q)cp -a $O/lib/* $(DESTDIR)$(libdir) ++ $(Q)cp -r $O/lib/* $(DESTDIR)$(libdir) + $(Q)$(call rte_mkdir, $(DESTDIR)$(bindir)) +- $(Q)tar -cf - -C $O --exclude 'app/*.map' \ +- --exclude app/dpdk-pmdinfogen \ +- --exclude 'app/cmdline*' --exclude app/test \ +- --exclude app/testacl --exclude app/testpipeline app | \ +- tar -xf - -C $(DESTDIR)$(bindir) --strip-components=1 \ +- --keep-newer-files ++ $(Q)tar -cf - -C $O --exclude app/dpdk-pmdinfogen app | \ ++ tar -xf - -C $(DESTDIR)$(bindir) --no-same-owner --no-same-permissions \ ++ --strip-components=1 --keep-newer-files --warning=no-ignore-newer + $(Q)$(call rte_mkdir, $(DESTDIR)$(datadir)) +- $(Q)cp -a $(RTE_SDK)/usertools $(DESTDIR)$(datadir) ++ $(Q)cp -r $(RTE_SDK)/usertools $(DESTDIR)$(datadir) ++ $(Q)$(call rte_symlink, $(DESTDIR)$(datadir)/usertools/dpdk-setup.sh, \ ++ $(DESTDIR)$(datadir)/usertools/setup.sh) ++ $(Q)$(call rte_symlink, $(DESTDIR)$(datadir)/usertools/dpdk-devbind.py, \ ++ $(DESTDIR)$(datadir)/usertools/dpdk_nic_bind.py) + $(Q)$(call rte_mkdir, $(DESTDIR)$(sbindir)) + $(Q)$(call rte_symlink, $(DESTDIR)$(datadir)/usertools/dpdk-devbind.py, \ + $(DESTDIR)$(sbindir)/dpdk-devbind) +@@ -142,7 +143,7 @@ endif + install-kmod: + ifneq ($(wildcard $O/kmod/*),) + $(Q)$(call rte_mkdir, $(DESTDIR)$(kerneldir)) +- $(Q)cp -a $O/kmod/* $(DESTDIR)$(kerneldir) ++ $(Q)cp -r $O/kmod/* $(DESTDIR)$(kerneldir) + endif + + install-sdk: +@@ -151,11 +152,9 @@ install-sdk: + tar -xf - -C $(DESTDIR)$(includedir) --strip-components=1 \ + --keep-newer-files + $(Q)$(call rte_mkdir, $(DESTDIR)$(sdkdir)) +- $(Q)cp -a $(RTE_SDK)/mk $(DESTDIR)$(sdkdir) +- $(Q)cp -a $(RTE_SDK)/buildtools $(DESTDIR)$(sdkdir) +- $(Q)$(call rte_mkdir, $(DESTDIR)$(targetdir)/app) +- $(Q)cp -a $O/.config $(DESTDIR)$(targetdir) +- $(Q)cp -a $O/app/dpdk-pmdinfogen $(DESTDIR)$(targetdir)/app ++ $(Q)cp -r $(RTE_SDK)/buildtools $(DESTDIR)$(sdkdir) ++ $(Q)$(call rte_mkdir, $(DESTDIR)$(targetdir)) ++ $(Q)cp -r $O/.config $(DESTDIR)$(targetdir) + $(Q)$(call rte_symlink, $(DESTDIR)$(includedir), $(DESTDIR)$(targetdir)/include) + $(Q)$(call rte_symlink, $(DESTDIR)$(libdir), $(DESTDIR)$(targetdir)/lib) + +@@ -171,4 +170,4 @@ ifneq ($(wildcard $O/doc/*/*/*pdf),) + $(Q)cp -a $O/doc/*/*/*pdf $(DESTDIR)$(docdir)/guides + endif + $(Q)$(call rte_mkdir, $(DESTDIR)$(datadir)) +- $(Q)cp -a $(RTE_SDK)/examples $(DESTDIR)$(datadir) ++ $(Q)cp -r $(RTE_SDK)/examples $(DESTDIR)$(datadir) +-- +1.9.1 + diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk_17.05.bb b/meta-dpdk/recipes-extended/dpdk/dpdk_17.05.bb new file mode 100644 index 00000000..1a696ede --- /dev/null +++ b/meta-dpdk/recipes-extended/dpdk/dpdk_17.05.bb @@ -0,0 +1,19 @@ +include dpdk.inc + +SRC_URI += "\ + file://dpdk-16.04-dpdk-enable-ip_fragmentation-in-common_base-config.patch \ + file://0001-examples-Fix-maybe-uninitialized-warning.patch \ + " + +SRC_URI[dpdk.md5sum] = "39c4e1110dd1ef9dab33edbae820f939" +SRC_URI[dpdk.sha256sum] = "763bfb7e1765efcc949e79d645dc9f1ebd16591431ba0db5ce22becd928dcd0a" + +export EXAMPLES_BUILD_DIR = "${RTE_TARGET}" +export ARCHDIR = "generic" + +do_configure_prepend () { + sed -e "s#CONFIG_RTE_LIBRTE_POWER=y#CONFIG_RTE_LIBRTE_POWER=${CONFIG_EXAMPLE_VM_POWER_MANAGER}#" -i ${S}/config/common_linuxapp +} + +COMPATIBLE_HOST_linux-gnux32 = "null" +COMPATIBLE_HOST_libc-musl_class-target = "null" diff --git a/meta-qat/COPYING.MIT b/meta-qat/COPYING.MIT new file mode 100644 index 00000000..fb950dc6 --- /dev/null +++ b/meta-qat/COPYING.MIT @@ -0,0 +1,17 @@ +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/meta-qat/LICENSE b/meta-qat/LICENSE new file mode 100644 index 00000000..e57d3b90 --- /dev/null +++ b/meta-qat/LICENSE @@ -0,0 +1,5 @@ +All metadata files (including, but not limited to bb, bbappend, +bbclass, inc and conf files) are MIT licensed unless otherwise stated. +Source code included in tree for individual recipes is under the +LICENSE stated in the associated recipe (.bb file) unless otherwise +stated. diff --git a/meta-qat/README b/meta-qat/README new file mode 100644 index 00000000..2c103465 --- /dev/null +++ b/meta-qat/README @@ -0,0 +1,85 @@ +meta-qat +======== + +This README file contains information on building and booting +meta-intel BSP layers. Please see the corresponding sections below +for details. + + +Yocto Project Compatible +======================== + +The BSPs contained in this layer are compatible with the Yocto Project +as per the requirements listed here: + + https://www.yoctoproject.org/webform/yocto-project-compatible-registration + + +Dependencies +============ + +This layer depends on: + + URI: git://git.openembedded.org/bitbake + branch: 1.34 + + URI: git://git.openembedded.org/openembedded-core + layers: meta + branch: rocko + + +Guidelines for submitting patches +==================================== + +Please submit any patches against meta-dpdk to the meta-intel +mailing list (meta-intel@yoctoproject.org). Also, if your patches are +available via a public git repository, please also include a URL to +the repo and branch containing your patches as that makes it easier +for maintainers to grab and test your patches. + +There are patch submission scripts available that will, among other +things, automatically include the repo URL and branch as mentioned. +Please see the Yocto Project Development Manual sections entitled +'Using Scripts to Push a Change Upstream and Request a Pull' and +'Using Email to Submit a Patch' for details. + +Regardless of how you submit a patch or patchset, the patches should +at minimum follow the suggestions outlined in the 'Submitting a Change +to the Yocto Project' section in the Yocto Project Development Manual. +Specifically, they should: + + - Include a 'Signed-off-by:' line. A commit can't legally be pulled + in without this. + + - Provide a single-line, short summary of the change. This short + description should be prefixed by the BSP or recipe name, as + appropriate, followed by a colon. Capitalize the first character + of the summary (following the colon). + + - For the body of the commit message, provide detailed information + that describes what you changed, why you made the change, and the + approach you used. + + - If the change addresses a specific bug or issue that is associated + with a bug-tracking ID, include a reference to that ID in your + detailed description in the following format: [YOCTO #<bug-id>]. + + - Pay attention to line length - please don't allow any particular + line in the commit message to stretch past 72 characters. + + - For any non-trivial patch, provide information about how you + tested the patch, and for any non-trivial or non-obvious testing + setup, provide details of that setup. + +Doing a quick 'git log' in meta-intel will provide you with many +examples of good example commits if you have questions about any +aspect of the preferred format. + +The meta-intel maintainers will do their best to review and/or pull in +a patch or patchset within 24 hours of the time it was posted. For +larger and/or more involved patches and patchsets, the review process +may take longer. + +Please see the meta-intel/MAINTAINERS file for the list of maintainers +and their specific areas; it's also a good idea to cc: the specific +maintainer, if applicable. diff --git a/meta-qat/conf/include/maintainers.inc b/meta-qat/conf/include/maintainers.inc new file mode 100644 index 00000000..9f4c2e31 --- /dev/null +++ b/meta-qat/conf/include/maintainers.inc @@ -0,0 +1,5 @@ +# This file contains a list of recipe maintainers for meta-intel + +RECIPE_MAINTAINER_pn-openssl-qat = "TBD DPDK Flex Team" +RECIPE_MAINTAINER_pn-qat16 = "TBD DPDK Flex Team" +RECIPE_MAINTAINER_pn-zlib-qat = "TBD DPDK Flex Team" diff --git a/meta-qat/conf/layer.conf b/meta-qat/conf/layer.conf new file mode 100644 index 00000000..2e3aa847 --- /dev/null +++ b/meta-qat/conf/layer.conf @@ -0,0 +1,20 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "intel-qat" +BBFILE_PATTERN_intel-qat := "^${LAYERDIR}/" +BBFILE_PRIORITY_intel-qat = "5" + +LAYERDEPENDS_intel-qat = "core intel" + +# This should only be incremented on significant changes that will +# cause compatibility issues with other layers +LAYERVERSION_intel-qat = "1" +LAYERSERIES_COMPAT_intel-qat = "rocko" + + +require ${LAYERDIR}/conf/include/maintainers.inc diff --git a/meta-qat/recipes-extended/openssl-qat/openssl-qat.inc b/meta-qat/recipes-extended/openssl-qat/openssl-qat.inc new file mode 100644 index 00000000..ff22825d --- /dev/null +++ b/meta-qat/recipes-extended/openssl-qat/openssl-qat.inc @@ -0,0 +1,125 @@ +SUMMARY = "libcrypto* (OpenSSL*) QAT_MEM Memory Management Module \ +for Intel Quick Assist Technology" +DESCRIPTION = "This software adds an engine that accelerates some of \ +the libcrypto algorithms via the Intel QuickAssist Technology \ +implemented on Intel Communications Chipset 89xx Series based platforms." + +HOMEPAGE = "http://www.openssl.org/" +SECTION = "libs/network" +LICENSE = "openssl & GPLv2 & BSD" + +LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=f9a8f968107345e0b75aa8c2ecaa7ec8 \ + file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 \ + file://${COMMON_LICENSE_DIR}/BSD;md5=3775480a712fc46a69647678acb234cb \ + " + +SRC_URI = "https://01.org/sites/default/files/page/libcrypto_shim_${PV}_withdocumentation.zip;name=openssl_qat;subdir=openssl_qat-${PV} \ + file://openssl_qat-environment-variables-to-have-precedence.patch \ + file://openssl_qat-pass-oe_ldflags-to-linker.patch \ + file://openssl_qat-remove-redundant-rpaths.patch \ + file://openssl_qat-build-qat_mem-ko-against-yocto-kernel.patch \ + file://openssl_qat-install-engines-in-libdir-ssl.patch \ + " + +DEPENDS += " qat16 zlib" +RDEPENDS_${PN} += " qat16 zlib zlib-qat" + +inherit pkgconfig module + +PACKAGES =+ "${PN}-misc" +PARALLEL_MAKE = "" + +AR_append = " r" +EXTRA_OEMAKE = "-e MAKEFLAGS=" + +export ICP_ROOT = "${WORKDIR}/git" +export ICP_BUILD_OUTPUT = "${STAGING_DIR_TARGET}" +export OPENSSL_ROOT = "${ICP_ROOT}" +export OPENSSL_PREFIX = "/usr/local" +export AS = "${CC} -c" +export OE_LDFLAGS="${LDFLAGS} -L${OPENSSL_PREFIX}{base_libdir}" +export ICP_API_PATH = "${STAGING_DIR_TARGET}${includedir}/lac" +export KERNEL_SOURCE_ROOT = "${STAGING_KERNEL_DIR}" +export KERNEL_BUILDDIR = "${STAGING_KERNEL_BUILDDIR}" + +S = "${WORKDIR}/git" + +opensslqat_do_patch() { + cd ${WORKDIR}/openssl_qat-${PV} + cd libcrypto_shim_${PV}_* + tar -zxof libCrypto_Shim_${PV}.tar.gz + tar -zxof libcrypto-openssl-${OPENSSL_VERSION}-qat.L.${PV}.tar.gz + mv openssl-${OPENSSL_VERSION}-qat.patch ${WORKDIR} + + cd ${S} + if [ ! -d ${S}/debian/patches ]; then + mkdir -p ${S}/debian/patches + cp -f ${WORKDIR}/openssl-${OPENSSL_VERSION}-qat.patch ${S}/debian/patches + echo "openssl-${OPENSSL_VERSION}-qat.patch -p1" > ${S}/debian/patches/series + fi + quilt pop -a || true + if [ -d ${S}/.pc-opensslqat ]; then + rm -rf ${S}/.pc + mv ${S}/.pc-opensslqat ${S}/.pc + QUILT_PATCHES=${S}/debian/patches quilt pop -a + rm -rf ${S}/.pc + fi + QUILT_PATCHES=${S}/debian/patches quilt push -a + mv ${S}/.pc ${S}/.pc-opensslqat +} + +# We invoke base do_patch at end, to incorporate any local patch +python do_patch() { + bb.build.exec_func('opensslqat_do_patch', d) + bb.build.exec_func('patch_do_patch', d) +} + +do_configure () { + os=linux + target=linux-x86_64 + + ./Configure -no-ssl3 enable-hw-qat --prefix=$OPENSSL_PREFIX --openssldir="${OPENSSL_PREFIX}${base_libdir}/ssl" --libdir="${base_libdir}" $target +} + +do_compile() { + oe_runmake +} + +do_install() { + install -m 0755 -d ${D}${bindir} \ + ${D}${OPENSSL_PREFIX}/include \ + ${D}${sysconfdir}/openssl_conf + + oe_runmake INSTALL_PREFIX="${D}" install + + cp --dereference -R include/openssl ${D}${OPENSSL_PREFIX}/include + + cp ${WORKDIR}/openssl_qat-${PV}/libcrypto_shim_${PV}_withdocumentation/qat/config/dh895xcc/multi_process_optimized/* ${D}${sysconfdir}/openssl_conf/ +} + +FILES_${PN}-misc += "\ + ${OPENSSL_PREFIX}${base_libdir}/ssl/misc \ + ${bindir}/c_rehash \ + " + +FILES_${PN}-dbg += "\ + ${OPENSSL_PREFIX}${base_libdir}/ssl/engines/.debug \ + ${OPENSSL_PREFIX}${base_libdir}/engines/.debug \ + ${OPENSSL_PREFIX}${base_libdir}/.debug \ + ${OPENSSL_PREFIX}/bin/.debug \ + " + +FILES_${PN}-dev = "${OPENSSL_PREFIX}/include" + +FILES_${PN}-staticdev += "${OPENSSL_PREFIX}${base_libdir}/*.a" + +FILES_${PN} =+ "\ + ${bindir} \ + ${sysconfdir}/openssl_conf \ + ${OPENSSL_PREFIX}/bin \ + ${OPENSSL_PREFIX}${base_libdir} \ + ${OPENSSL_PREFIX}${base_libdir}/ssl \ + ${OPENSSL_PREFIX}${base_libdir}/ssl/openssl.cnf \ + " + +COMPATIBLE_MACHINE = "null" diff --git a/meta-qat/recipes-extended/openssl-qat/openssl-qat/0001-Use_sched_yield_api.patch b/meta-qat/recipes-extended/openssl-qat/openssl-qat/0001-Use_sched_yield_api.patch new file mode 100644 index 00000000..1b7921fa --- /dev/null +++ b/meta-qat/recipes-extended/openssl-qat/openssl-qat/0001-Use_sched_yield_api.patch @@ -0,0 +1,47 @@ +From f4c50648752ee1000f606585f4df9fa6bd9ff8e8 Mon Sep 17 00:00:00 2001 +From: Saul Wold <sgw@linux.intel.com> +Date: Wed, 8 Feb 2017 17:36:48 -0800 +Subject: [PATCH] openssl-qat: Use sched_yield() instead of pthread_yield() + +sched_yield() is the correct POSIX API to use for thread switching +This futher supports building with MUSL. + +Upstream-Status: Pending +Signed-off-by: Saul Wold <sgw@linux.intel.com> +--- + engines/qat_engine/e_qat.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/engines/qat_engine/e_qat.c b/engines/qat_engine/e_qat.c +index 17d7935..af543bc 100644 +--- a/engines/qat_engine/e_qat.c ++++ b/engines/qat_engine/e_qat.c +@@ -90,6 +90,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <string.h> ++#include <sched.h> + #include <pthread.h> + #include <unistd.h> + #include <ctype.h> +@@ -545,7 +546,7 @@ CpaStatus myPerformOp(const CpaInstanceHandle instanceHandle, + pSrcBuffer, pDstBuffer, pVerifyResult); + if (status == CPA_STATUS_RETRY) { + qatPerformOpRetries++; +- pthread_yield(); ++ sched_yield(); + if (uiRetry >= iMsgRetry + && iMsgRetry != QAT_INFINITE_MAX_NUM_RETRIES) { + break; +@@ -588,7 +589,7 @@ static void *sendPoll(void *ih) + if (likely(CPA_STATUS_SUCCESS == status)) { + /* Do nothing */ + } else if (CPA_STATUS_RETRY == status) { +- pthread_yield(); ++ sched_yield(); + } else { + WARN("WARNING icp_sal_CyPollInstance returned status %d\n", + status); +-- +2.7.4 + diff --git a/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl-qat_0.4.9-009-openssl_qat-add-openssl-async-specific-symbols.patch b/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl-qat_0.4.9-009-openssl_qat-add-openssl-async-specific-symbols.patch new file mode 100644 index 00000000..d3451aed --- /dev/null +++ b/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl-qat_0.4.9-009-openssl_qat-add-openssl-async-specific-symbols.patch @@ -0,0 +1,113 @@ +From a5068bd456c60b5611494dff2db2093ad6693e6a Mon Sep 17 00:00:00 2001 +From: Anuj Mittal <anujx.mittal@intel.com> +Date: Thu, 9 Jul 2015 23:58:34 +0800 +Subject: [PATCH] openssl_qat: add openssl async specific symbols + +Upstream-Status: Inappropriate [Configuration] + +Signed-off-by: Anuj Mittal <anujx.mittal@intel.com> +--- + engines/ccgost/openssl.ld | 8 ++++++++ + engines/openssl.ld | 9 +++++++++ + engines/qat_engine/openssl.ld | 19 +++++++++++++++++++ + openssl.ld | 28 ++++++++++++++++++++++++++++ + 4 files changed, 64 insertions(+) + create mode 100644 engines/qat_engine/openssl.ld + +diff --git a/engines/ccgost/openssl.ld b/engines/ccgost/openssl.ld +index 010fd6f..edf9d87 100644 +--- a/engines/ccgost/openssl.ld ++++ b/engines/ccgost/openssl.ld +@@ -8,3 +8,11 @@ OPENSSL_1.0.0 { + *; + }; + ++OPENSSL_1.0.1async { ++ global: ++ qaeCryptoMemV2P; ++ qaeCryptoAtFork; ++ qaeCryptoMemAlloc; ++ qaeCryptoMemRealloc; ++ qaeCryptoMemFree; ++} OPENSSL_1.0.0; +diff --git a/engines/openssl.ld b/engines/openssl.ld +index 010fd6f..3d56887 100644 +--- a/engines/openssl.ld ++++ b/engines/openssl.ld +@@ -8,3 +8,12 @@ OPENSSL_1.0.0 { + *; + }; + ++OPENSSL_1.0.1async { ++ global: ++ qaeCryptoMemV2P; ++ qaeCryptoAtFork; ++ qaeCryptoMemAlloc; ++ qaeCryptoMemRealloc; ++ qaeCryptoMemFree; ++} OPENSSL_1.0.0; ++ +diff --git a/engines/qat_engine/openssl.ld b/engines/qat_engine/openssl.ld +new file mode 100644 +index 0000000..bdd927d +--- /dev/null ++++ b/engines/qat_engine/openssl.ld +@@ -0,0 +1,19 @@ ++OPENSSL_1.0.0 { ++ global: ++ bind_engine; ++ v_check; ++ OPENSSL_init; ++ OPENSSL_finish; ++ local: ++ *; ++}; ++ ++OPENSSL_1.0.1async { ++ global: ++ qaeCryptoMemV2P; ++ qaeCryptoAtFork; ++ qaeCryptoMemAlloc; ++ qaeCryptoMemRealloc; ++ qaeCryptoMemFree; ++} OPENSSL_1.0.0; ++ +diff --git a/openssl.ld b/openssl.ld +index 0c0ed28..afa9349 100644 +--- a/openssl.ld ++++ b/openssl.ld +@@ -4618,3 +4618,31 @@ OPENSSL_1.0.1d { + CRYPTO_memcmp; + } OPENSSL_1.0.1; + ++OPENSSL_1.0.1async { ++ global: ++ ECDH_compute_key_asynch; ++ ECDH_generate_key_asynch; ++ ECDH_generate_key; ++ DH_compute_key_asynch; ++ DH_generate_key_asynch; ++ ECDSA_verify_asynch; ++ ECDSA_sign_asynch; ++ DSA_verify_asynch; ++ DSA_sign_asynch; ++ RSA_public_decrypt_asynch; ++ RSA_private_encrypt_asynch; ++ EVP_MD_CTX_ctrl_ex; ++ EVP_CIPHER_CTX_ctrl_ex; ++ qaeCryptoMemV2P; ++ qaeCryptoAtFork; ++ SSL_CTX_set_asynch_completion_callback; ++ RSA_private_decrypt_asynch; ++ RSA_public_encrypt_asynch; ++ qaeCryptoMemAlloc; ++ qaeCryptoMemRealloc; ++ qaeCryptoMemFree; ++ RSA_sign_asynch; ++ RSA_verify_asynch; ++ EVP_PKEY_derive_PRF; ++} OPENSSL_1.0.1; ++ +-- +1.7.9.5 + diff --git a/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl-qat_0.4.9-009-openssl_qat-add-version-script.patch b/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl-qat_0.4.9-009-openssl_qat-add-version-script.patch new file mode 100644 index 00000000..65ddefa0 --- /dev/null +++ b/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl-qat_0.4.9-009-openssl_qat-add-version-script.patch @@ -0,0 +1,4695 @@ +From bc9cd3323cddbad8550ef0d926faf972b37d1a68 Mon Sep 17 00:00:00 2001 +From: Anuj Mittal <anujx.mittal@intel.com> +Date: Thu, 9 Jul 2015 23:49:14 +0800 +Subject: [PATCH] openssl_qat: add version script + +Upstream-Status: Backport [debian] + +(Taken from meta/recipes-connectivity/openssl/openssl + rev: 5dd1d7566964c90d33c0c44f569d9336fb0724ce) + +Signed-off-by: Anuj Mittal <anujx.mittal@intel.com> +--- + Configure | 2 + + engines/ccgost/openssl.ld | 10 + + engines/openssl.ld | 10 + + openssl.ld | 4620 +++++++++++++++++++++++++++++++++++++++++++++ + 4 files changed, 4642 insertions(+) + create mode 100644 engines/ccgost/openssl.ld + create mode 100644 engines/openssl.ld + create mode 100644 openssl.ld + +diff --git a/Configure b/Configure +index 44c643c..ba78202 100755 +--- a/Configure ++++ b/Configure +@@ -1614,6 +1614,8 @@ if ($strict_warnings) + } + } + ++$shared_ldflag .= " -Wl,--version-script=openssl.ld"; ++ + open(IN,'<Makefile.org') || die "unable to read Makefile.org:$!\n"; + unlink("$Makefile.new") || die "unable to remove old $Makefile.new:$!\n" if -e "$Makefile.new"; + open(OUT,">$Makefile.new") || die "unable to create $Makefile.new:$!\n"; +diff --git a/engines/ccgost/openssl.ld b/engines/ccgost/openssl.ld +new file mode 100644 +index 0000000..010fd6f +--- /dev/null ++++ b/engines/ccgost/openssl.ld +@@ -0,0 +1,10 @@ ++OPENSSL_1.0.0 { ++ global: ++ bind_engine; ++ v_check; ++ OPENSSL_init; ++ OPENSSL_finish; ++ local: ++ *; ++}; ++ +diff --git a/engines/openssl.ld b/engines/openssl.ld +new file mode 100644 +index 0000000..010fd6f +--- /dev/null ++++ b/engines/openssl.ld +@@ -0,0 +1,10 @@ ++OPENSSL_1.0.0 { ++ global: ++ bind_engine; ++ v_check; ++ OPENSSL_init; ++ OPENSSL_finish; ++ local: ++ *; ++}; ++ +diff --git a/openssl.ld b/openssl.ld +new file mode 100644 +index 0000000..0c0ed28 +--- /dev/null ++++ b/openssl.ld +@@ -0,0 +1,4620 @@ ++OPENSSL_1.0.0 { ++ global: ++ BIO_f_ssl; ++ BIO_new_buffer_ssl_connect; ++ BIO_new_ssl; ++ BIO_new_ssl_connect; ++ BIO_proxy_ssl_copy_session_id; ++ BIO_ssl_copy_session_id; ++ BIO_ssl_shutdown; ++ d2i_SSL_SESSION; ++ DTLSv1_client_method; ++ DTLSv1_method; ++ DTLSv1_server_method; ++ ERR_load_SSL_strings; ++ i2d_SSL_SESSION; ++ kssl_build_principal_2; ++ kssl_cget_tkt; ++ kssl_check_authent; ++ kssl_ctx_free; ++ kssl_ctx_new; ++ kssl_ctx_setkey; ++ kssl_ctx_setprinc; ++ kssl_ctx_setstring; ++ kssl_ctx_show; ++ kssl_err_set; ++ kssl_krb5_free_data_contents; ++ kssl_sget_tkt; ++ kssl_skip_confound; ++ kssl_validate_times; ++ PEM_read_bio_SSL_SESSION; ++ PEM_read_SSL_SESSION; ++ PEM_write_bio_SSL_SESSION; ++ PEM_write_SSL_SESSION; ++ SSL_accept; ++ SSL_add_client_CA; ++ SSL_add_dir_cert_subjects_to_stack; ++ SSL_add_dir_cert_subjs_to_stk; ++ SSL_add_file_cert_subjects_to_stack; ++ SSL_add_file_cert_subjs_to_stk; ++ SSL_alert_desc_string; ++ SSL_alert_desc_string_long; ++ SSL_alert_type_string; ++ SSL_alert_type_string_long; ++ SSL_callback_ctrl; ++ SSL_check_private_key; ++ SSL_CIPHER_description; ++ SSL_CIPHER_get_bits; ++ SSL_CIPHER_get_name; ++ SSL_CIPHER_get_version; ++ SSL_clear; ++ SSL_COMP_add_compression_method; ++ SSL_COMP_get_compression_methods; ++ SSL_COMP_get_compress_methods; ++ SSL_COMP_get_name; ++ SSL_connect; ++ SSL_copy_session_id; ++ SSL_ctrl; ++ SSL_CTX_add_client_CA; ++ SSL_CTX_add_session; ++ SSL_CTX_callback_ctrl; ++ SSL_CTX_check_private_key; ++ SSL_CTX_ctrl; ++ SSL_CTX_flush_sessions; ++ SSL_CTX_free; ++ SSL_CTX_get_cert_store; ++ SSL_CTX_get_client_CA_list; ++ SSL_CTX_get_client_cert_cb; ++ SSL_CTX_get_ex_data; ++ SSL_CTX_get_ex_new_index; ++ SSL_CTX_get_info_callback; ++ SSL_CTX_get_quiet_shutdown; ++ SSL_CTX_get_timeout; ++ SSL_CTX_get_verify_callback; ++ SSL_CTX_get_verify_depth; ++ SSL_CTX_get_verify_mode; ++ SSL_CTX_load_verify_locations; ++ SSL_CTX_new; ++ SSL_CTX_remove_session; ++ SSL_CTX_sess_get_get_cb; ++ SSL_CTX_sess_get_new_cb; ++ SSL_CTX_sess_get_remove_cb; ++ SSL_CTX_sessions; ++ SSL_CTX_sess_set_get_cb; ++ SSL_CTX_sess_set_new_cb; ++ SSL_CTX_sess_set_remove_cb; ++ SSL_CTX_set1_param; ++ SSL_CTX_set_cert_store; ++ SSL_CTX_set_cert_verify_callback; ++ SSL_CTX_set_cert_verify_cb; ++ SSL_CTX_set_cipher_list; ++ SSL_CTX_set_client_CA_list; ++ SSL_CTX_set_client_cert_cb; ++ SSL_CTX_set_client_cert_engine; ++ SSL_CTX_set_cookie_generate_cb; ++ SSL_CTX_set_cookie_verify_cb; ++ SSL_CTX_set_default_passwd_cb; ++ SSL_CTX_set_default_passwd_cb_userdata; ++ SSL_CTX_set_default_verify_paths; ++ SSL_CTX_set_def_passwd_cb_ud; ++ SSL_CTX_set_def_verify_paths; ++ SSL_CTX_set_ex_data; ++ SSL_CTX_set_generate_session_id; ++ SSL_CTX_set_info_callback; ++ SSL_CTX_set_msg_callback; ++ SSL_CTX_set_psk_client_callback; ++ SSL_CTX_set_psk_server_callback; ++ SSL_CTX_set_purpose; ++ SSL_CTX_set_quiet_shutdown; ++ SSL_CTX_set_session_id_context; ++ SSL_CTX_set_ssl_version; ++ SSL_CTX_set_timeout; ++ SSL_CTX_set_tmp_dh_callback; ++ SSL_CTX_set_tmp_ecdh_callback; ++ SSL_CTX_set_tmp_rsa_callback; ++ SSL_CTX_set_trust; ++ SSL_CTX_set_verify; ++ SSL_CTX_set_verify_depth; ++ SSL_CTX_use_cert_chain_file; ++ SSL_CTX_use_certificate; ++ SSL_CTX_use_certificate_ASN1; ++ SSL_CTX_use_certificate_chain_file; ++ SSL_CTX_use_certificate_file; ++ SSL_CTX_use_PrivateKey; ++ SSL_CTX_use_PrivateKey_ASN1; ++ SSL_CTX_use_PrivateKey_file; ++ SSL_CTX_use_psk_identity_hint; ++ SSL_CTX_use_RSAPrivateKey; ++ SSL_CTX_use_RSAPrivateKey_ASN1; ++ SSL_CTX_use_RSAPrivateKey_file; ++ SSL_do_handshake; ++ SSL_dup; ++ SSL_dup_CA_list; ++ SSLeay_add_ssl_algorithms; ++ SSL_free; ++ SSL_get1_session; ++ SSL_get_certificate; ++ SSL_get_cipher_list; ++ SSL_get_ciphers; ++ SSL_get_client_CA_list; ++ SSL_get_current_cipher; ++ SSL_get_current_compression; ++ SSL_get_current_expansion; ++ SSL_get_default_timeout; ++ SSL_get_error; ++ SSL_get_ex_data; ++ SSL_get_ex_data_X509_STORE_CTX_idx; ++ SSL_get_ex_d_X509_STORE_CTX_idx; ++ SSL_get_ex_new_index; ++ SSL_get_fd; ++ SSL_get_finished; ++ SSL_get_info_callback; ++ SSL_get_peer_cert_chain; ++ SSL_get_peer_certificate; ++ SSL_get_peer_finished; ++ SSL_get_privatekey; ++ SSL_get_psk_identity; ++ SSL_get_psk_identity_hint; ++ SSL_get_quiet_shutdown; ++ SSL_get_rbio; ++ SSL_get_read_ahead; ++ SSL_get_rfd; ++ SSL_get_servername; ++ SSL_get_servername_type; ++ SSL_get_session; ++ SSL_get_shared_ciphers; ++ SSL_get_shutdown; ++ SSL_get_SSL_CTX; ++ SSL_get_ssl_method; ++ SSL_get_verify_callback; ++ SSL_get_verify_depth; ++ SSL_get_verify_mode; ++ SSL_get_verify_result; ++ SSL_get_version; ++ SSL_get_wbio; ++ SSL_get_wfd; ++ SSL_has_matching_session_id; ++ SSL_library_init; ++ SSL_load_client_CA_file; ++ SSL_load_error_strings; ++ SSL_new; ++ SSL_peek; ++ SSL_pending; ++ SSL_read; ++ SSL_renegotiate; ++ SSL_renegotiate_pending; ++ SSL_rstate_string; ++ SSL_rstate_string_long; ++ SSL_SESSION_cmp; ++ SSL_SESSION_free; ++ SSL_SESSION_get_ex_data; ++ SSL_SESSION_get_ex_new_index; ++ SSL_SESSION_get_id; ++ SSL_SESSION_get_time; ++ SSL_SESSION_get_timeout; ++ SSL_SESSION_hash; ++ SSL_SESSION_new; ++ SSL_SESSION_print; ++ SSL_SESSION_print_fp; ++ SSL_SESSION_set_ex_data; ++ SSL_SESSION_set_time; ++ SSL_SESSION_set_timeout; ++ SSL_set1_param; ++ SSL_set_accept_state; ++ SSL_set_bio; ++ SSL_set_cipher_list; ++ SSL_set_client_CA_list; ++ SSL_set_connect_state; ++ SSL_set_ex_data; ++ SSL_set_fd; ++ SSL_set_generate_session_id; ++ SSL_set_info_callback; ++ SSL_set_msg_callback; ++ SSL_set_psk_client_callback; ++ SSL_set_psk_server_callback; ++ SSL_set_purpose; ++ SSL_set_quiet_shutdown; ++ SSL_set_read_ahead; ++ SSL_set_rfd; ++ SSL_set_session; ++ SSL_set_session_id_context; ++ SSL_set_session_secret_cb; ++ SSL_set_session_ticket_ext; ++ SSL_set_session_ticket_ext_cb; ++ SSL_set_shutdown; ++ SSL_set_SSL_CTX; ++ SSL_set_ssl_method; ++ SSL_set_tmp_dh_callback; ++ SSL_set_tmp_ecdh_callback; ++ SSL_set_tmp_rsa_callback; ++ SSL_set_trust; ++ SSL_set_verify; ++ SSL_set_verify_depth; ++ SSL_set_verify_result; ++ SSL_set_wfd; ++ SSL_shutdown; ++ SSL_state; ++ SSL_state_string; ++ SSL_state_string_long; ++ SSL_use_certificate; ++ SSL_use_certificate_ASN1; ++ SSL_use_certificate_file; ++ SSL_use_PrivateKey; ++ SSL_use_PrivateKey_ASN1; ++ SSL_use_PrivateKey_file; ++ SSL_use_psk_identity_hint; ++ SSL_use_RSAPrivateKey; ++ SSL_use_RSAPrivateKey_ASN1; ++ SSL_use_RSAPrivateKey_file; ++ SSLv23_client_method; ++ SSLv23_method; ++ SSLv23_server_method; ++ SSLv2_client_method; ++ SSLv2_method; ++ SSLv2_server_method; ++ SSLv3_client_method; ++ SSLv3_method; ++ SSLv3_server_method; ++ SSL_version; ++ SSL_want; ++ SSL_write; ++ TLSv1_client_method; ++ TLSv1_method; ++ TLSv1_server_method; ++ ++ ++ SSLeay; ++ SSLeay_version; ++ ASN1_BIT_STRING_asn1_meth; ++ ASN1_HEADER_free; ++ ASN1_HEADER_new; ++ ASN1_IA5STRING_asn1_meth; ++ ASN1_INTEGER_get; ++ ASN1_INTEGER_set; ++ ASN1_INTEGER_to_BN; ++ ASN1_OBJECT_create; ++ ASN1_OBJECT_free; ++ ASN1_OBJECT_new; ++ ASN1_PRINTABLE_type; ++ ASN1_STRING_cmp; ++ ASN1_STRING_dup; ++ ASN1_STRING_free; ++ ASN1_STRING_new; ++ ASN1_STRING_print; ++ ASN1_STRING_set; ++ ASN1_STRING_type_new; ++ ASN1_TYPE_free; ++ ASN1_TYPE_new; ++ ASN1_UNIVERSALSTRING_to_string; ++ ASN1_UTCTIME_check; ++ ASN1_UTCTIME_print; ++ ASN1_UTCTIME_set; ++ ASN1_check_infinite_end; ++ ASN1_d2i_bio; ++ ASN1_d2i_fp; ++ ASN1_digest; ++ ASN1_dup; ++ ASN1_get_object; ++ ASN1_i2d_bio; ++ ASN1_i2d_fp; ++ ASN1_object_size; ++ ASN1_parse; ++ ASN1_put_object; ++ ASN1_sign; ++ ASN1_verify; ++ BF_cbc_encrypt; ++ BF_cfb64_encrypt; ++ BF_ecb_encrypt; ++ BF_encrypt; ++ BF_ofb64_encrypt; ++ BF_options; ++ BF_set_key; ++ BIO_CONNECT_free; ++ BIO_CONNECT_new; ++ BIO_accept; ++ BIO_ctrl; ++ BIO_int_ctrl; ++ BIO_debug_callback; ++ BIO_dump; ++ BIO_dup_chain; ++ BIO_f_base64; ++ BIO_f_buffer; ++ BIO_f_cipher; ++ BIO_f_md; ++ BIO_f_null; ++ BIO_f_proxy_server; ++ BIO_fd_non_fatal_error; ++ BIO_fd_should_retry; ++ BIO_find_type; ++ BIO_free; ++ BIO_free_all; ++ BIO_get_accept_socket; ++ BIO_get_filter_bio; ++ BIO_get_host_ip; ++ BIO_get_port; ++ BIO_get_retry_BIO; ++ BIO_get_retry_reason; ++ BIO_gethostbyname; ++ BIO_gets; ++ BIO_new; ++ BIO_new_accept; ++ BIO_new_connect; ++ BIO_new_fd; ++ BIO_new_file; ++ BIO_new_fp; ++ BIO_new_socket; ++ BIO_pop; ++ BIO_printf; ++ BIO_push; ++ BIO_puts; ++ BIO_read; ++ BIO_s_accept; ++ BIO_s_connect; ++ BIO_s_fd; ++ BIO_s_file; ++ BIO_s_mem; ++ BIO_s_null; ++ BIO_s_proxy_client; ++ BIO_s_socket; ++ BIO_set; ++ BIO_set_cipher; ++ BIO_set_tcp_ndelay; ++ BIO_sock_cleanup; ++ BIO_sock_error; ++ BIO_sock_init; ++ BIO_sock_non_fatal_error; ++ BIO_sock_should_retry; ++ BIO_socket_ioctl; ++ BIO_write; ++ BN_CTX_free; ++ BN_CTX_new; ++ BN_MONT_CTX_free; ++ BN_MONT_CTX_new; ++ BN_MONT_CTX_set; ++ BN_add; ++ BN_add_word; ++ BN_hex2bn; ++ BN_bin2bn; ++ BN_bn2hex; ++ BN_bn2bin; ++ BN_clear; ++ BN_clear_bit; ++ BN_clear_free; ++ BN_cmp; ++ BN_copy; ++ BN_div; ++ BN_div_word; ++ BN_dup; ++ BN_free; ++ BN_from_montgomery; ++ BN_gcd; ++ BN_generate_prime; ++ BN_get_word; ++ BN_is_bit_set; ++ BN_is_prime; ++ BN_lshift; ++ BN_lshift1; ++ BN_mask_bits; ++ BN_mod; ++ BN_mod_exp; ++ BN_mod_exp_mont; ++ BN_mod_exp_simple; ++ BN_mod_inverse; ++ BN_mod_mul; ++ BN_mod_mul_montgomery; ++ BN_mod_word; ++ BN_mul; ++ BN_new; ++ BN_num_bits; ++ BN_num_bits_word; ++ BN_options; ++ BN_print; ++ BN_print_fp; ++ BN_rand; ++ BN_reciprocal; ++ BN_rshift; ++ BN_rshift1; ++ BN_set_bit; ++ BN_set_word; ++ BN_sqr; ++ BN_sub; ++ BN_to_ASN1_INTEGER; ++ BN_ucmp; ++ BN_value_one; ++ BUF_MEM_free; ++ BUF_MEM_grow; ++ BUF_MEM_new; ++ BUF_strdup; ++ CONF_free; ++ CONF_get_number; ++ CONF_get_section; ++ CONF_get_string; ++ CONF_load; ++ CRYPTO_add_lock; ++ CRYPTO_dbg_free; ++ CRYPTO_dbg_malloc; ++ CRYPTO_dbg_realloc; ++ CRYPTO_dbg_remalloc; ++ CRYPTO_free; ++ CRYPTO_get_add_lock_callback; ++ CRYPTO_get_id_callback; ++ CRYPTO_get_lock_name; ++ CRYPTO_get_locking_callback; ++ CRYPTO_get_mem_functions; ++ CRYPTO_lock; ++ CRYPTO_malloc; ++ CRYPTO_mem_ctrl; ++ CRYPTO_mem_leaks; ++ CRYPTO_mem_leaks_cb; ++ CRYPTO_mem_leaks_fp; ++ CRYPTO_realloc; ++ CRYPTO_remalloc; ++ CRYPTO_set_add_lock_callback; ++ CRYPTO_set_id_callback; ++ CRYPTO_set_locking_callback; ++ CRYPTO_set_mem_functions; ++ CRYPTO_thread_id; ++ DH_check; ++ DH_compute_key; ++ DH_free; ++ DH_generate_key; ++ DH_generate_parameters; ++ DH_new; ++ DH_size; ++ DHparams_print; ++ DHparams_print_fp; ++ DSA_free; ++ DSA_generate_key; ++ DSA_generate_parameters; ++ DSA_is_prime; ++ DSA_new; ++ DSA_print; ++ DSA_print_fp; ++ DSA_sign; ++ DSA_sign_setup; ++ DSA_size; ++ DSA_verify; ++ DSAparams_print; ++ DSAparams_print_fp; ++ ERR_clear_error; ++ ERR_error_string; ++ ERR_free_strings; ++ ERR_func_error_string; ++ ERR_get_err_state_table; ++ ERR_get_error; ++ ERR_get_error_line; ++ ERR_get_state; ++ ERR_get_string_table; ++ ERR_lib_error_string; ++ ERR_load_ASN1_strings; ++ ERR_load_BIO_strings; ++ ERR_load_BN_strings; ++ ERR_load_BUF_strings; ++ ERR_load_CONF_strings; ++ ERR_load_DH_strings; ++ ERR_load_DSA_strings; ++ ERR_load_ERR_strings; ++ ERR_load_EVP_strings; ++ ERR_load_OBJ_strings; ++ ERR_load_PEM_strings; ++ ERR_load_PROXY_strings; ++ ERR_load_RSA_strings; ++ ERR_load_X509_strings; ++ ERR_load_crypto_strings; ++ ERR_load_strings; ++ ERR_peek_error; ++ ERR_peek_error_line; ++ ERR_print_errors; ++ ERR_print_errors_fp; ++ ERR_put_error; ++ ERR_reason_error_string; ++ ERR_remove_state; ++ EVP_BytesToKey; ++ EVP_CIPHER_CTX_cleanup; ++ EVP_CipherFinal; ++ EVP_CipherInit; ++ EVP_CipherUpdate; ++ EVP_DecodeBlock; ++ EVP_DecodeFinal; ++ EVP_DecodeInit; ++ EVP_DecodeUpdate; ++ EVP_DecryptFinal; ++ EVP_DecryptInit; ++ EVP_DecryptUpdate; ++ EVP_DigestFinal; ++ EVP_DigestInit; ++ EVP_DigestUpdate; ++ EVP_EncodeBlock; ++ EVP_EncodeFinal; ++ EVP_EncodeInit; ++ EVP_EncodeUpdate; ++ EVP_EncryptFinal; ++ EVP_EncryptInit; ++ EVP_EncryptUpdate; ++ EVP_OpenFinal; ++ EVP_OpenInit; ++ EVP_PKEY_assign; ++ EVP_PKEY_copy_parameters; ++ EVP_PKEY_free; ++ EVP_PKEY_missing_parameters; ++ EVP_PKEY_new; ++ EVP_PKEY_save_parameters; ++ EVP_PKEY_size; ++ EVP_PKEY_type; ++ EVP_SealFinal; ++ EVP_SealInit; ++ EVP_SignFinal; ++ EVP_VerifyFinal; ++ EVP_add_alias; ++ EVP_add_cipher; ++ EVP_add_digest; ++ EVP_bf_cbc; ++ EVP_bf_cfb64; ++ EVP_bf_ecb; ++ EVP_bf_ofb; ++ EVP_cleanup; ++ EVP_des_cbc; ++ EVP_des_cfb64; ++ EVP_des_ecb; ++ EVP_des_ede; ++ EVP_des_ede3; ++ EVP_des_ede3_cbc; ++ EVP_des_ede3_cfb64; ++ EVP_des_ede3_ofb; ++ EVP_des_ede_cbc; ++ EVP_des_ede_cfb64; ++ EVP_des_ede_ofb; ++ EVP_des_ofb; ++ EVP_desx_cbc; ++ EVP_dss; ++ EVP_dss1; ++ EVP_enc_null; ++ EVP_get_cipherbyname; ++ EVP_get_digestbyname; ++ EVP_get_pw_prompt; ++ EVP_idea_cbc; ++ EVP_idea_cfb64; ++ EVP_idea_ecb; ++ EVP_idea_ofb; ++ EVP_md2; ++ EVP_md5; ++ EVP_md_null; ++ EVP_rc2_cbc; ++ EVP_rc2_cfb64; ++ EVP_rc2_ecb; ++ EVP_rc2_ofb; ++ EVP_rc4; ++ EVP_read_pw_string; ++ EVP_set_pw_prompt; ++ EVP_sha; ++ EVP_sha1; ++ MD2; ++ MD2_Final; ++ MD2_Init; ++ MD2_Update; ++ MD2_options; ++ MD5; ++ MD5_Final; ++ MD5_Init; ++ MD5_Update; ++ MDC2; ++ MDC2_Final; ++ MDC2_Init; ++ MDC2_Update; ++ NETSCAPE_SPKAC_free; ++ NETSCAPE_SPKAC_new; ++ NETSCAPE_SPKI_free; ++ NETSCAPE_SPKI_new; ++ NETSCAPE_SPKI_sign; ++ NETSCAPE_SPKI_verify; ++ OBJ_add_object; ++ OBJ_bsearch; ++ OBJ_cleanup; ++ OBJ_cmp; ++ OBJ_create; ++ OBJ_dup; ++ OBJ_ln2nid; ++ OBJ_new_nid; ++ OBJ_nid2ln; ++ OBJ_nid2obj; ++ OBJ_nid2sn; ++ OBJ_obj2nid; ++ OBJ_sn2nid; ++ OBJ_txt2nid; ++ PEM_ASN1_read; ++ PEM_ASN1_read_bio; ++ PEM_ASN1_write; ++ PEM_ASN1_write_bio; ++ PEM_SealFinal; ++ PEM_SealInit; ++ PEM_SealUpdate; ++ PEM_SignFinal; ++ PEM_SignInit; ++ PEM_SignUpdate; ++ PEM_X509_INFO_read; ++ PEM_X509_INFO_read_bio; ++ PEM_X509_INFO_write_bio; ++ PEM_dek_info; ++ PEM_do_header; ++ PEM_get_EVP_CIPHER_INFO; ++ PEM_proc_type; ++ PEM_read; ++ PEM_read_DHparams; ++ PEM_read_DSAPrivateKey; ++ PEM_read_DSAparams; ++ PEM_read_PKCS7; ++ PEM_read_PrivateKey; ++ PEM_read_RSAPrivateKey; ++ PEM_read_X509; ++ PEM_read_X509_CRL; ++ PEM_read_X509_REQ; ++ PEM_read_bio; ++ PEM_read_bio_DHparams; ++ PEM_read_bio_DSAPrivateKey; ++ PEM_read_bio_DSAparams; ++ PEM_read_bio_PKCS7; ++ PEM_read_bio_PrivateKey; ++ PEM_read_bio_RSAPrivateKey; ++ PEM_read_bio_X509; ++ PEM_read_bio_X509_CRL; ++ PEM_read_bio_X509_REQ; ++ PEM_write; ++ PEM_write_DHparams; ++ PEM_write_DSAPrivateKey; ++ PEM_write_DSAparams; ++ PEM_write_PKCS7; ++ PEM_write_PrivateKey; ++ PEM_write_RSAPrivateKey; ++ PEM_write_X509; ++ PEM_write_X509_CRL; ++ PEM_write_X509_REQ; ++ PEM_write_bio; ++ PEM_write_bio_DHparams; ++ PEM_write_bio_DSAPrivateKey; ++ PEM_write_bio_DSAparams; ++ PEM_write_bio_PKCS7; ++ PEM_write_bio_PrivateKey; ++ PEM_write_bio_RSAPrivateKey; ++ PEM_write_bio_X509; ++ PEM_write_bio_X509_CRL; ++ PEM_write_bio_X509_REQ; ++ PKCS7_DIGEST_free; ++ PKCS7_DIGEST_new; ++ PKCS7_ENCRYPT_free; ++ PKCS7_ENCRYPT_new; ++ PKCS7_ENC_CONTENT_free; ++ PKCS7_ENC_CONTENT_new; ++ PKCS7_ENVELOPE_free; ++ PKCS7_ENVELOPE_new; ++ PKCS7_ISSUER_AND_SERIAL_digest; ++ PKCS7_ISSUER_AND_SERIAL_free; ++ PKCS7_ISSUER_AND_SERIAL_new; ++ PKCS7_RECIP_INFO_free; ++ PKCS7_RECIP_INFO_new; ++ PKCS7_SIGNED_free; ++ PKCS7_SIGNED_new; ++ PKCS7_SIGNER_INFO_free; ++ PKCS7_SIGNER_INFO_new; ++ PKCS7_SIGN_ENVELOPE_free; ++ PKCS7_SIGN_ENVELOPE_new; ++ PKCS7_dup; ++ PKCS7_free; ++ PKCS7_new; ++ PROXY_ENTRY_add_noproxy; ++ PROXY_ENTRY_clear_noproxy; ++ PROXY_ENTRY_free; ++ PROXY_ENTRY_get_noproxy; ++ PROXY_ENTRY_new; ++ PROXY_ENTRY_set_server; ++ PROXY_add_noproxy; ++ PROXY_add_server; ++ PROXY_check_by_host; ++ PROXY_check_url; ++ PROXY_clear_noproxy; ++ PROXY_free; ++ PROXY_get_noproxy; ++ PROXY_get_proxies; ++ PROXY_get_proxy_entry; ++ PROXY_load_conf; ++ PROXY_new; ++ PROXY_print; ++ RAND_bytes; ++ RAND_cleanup; ++ RAND_file_name; ++ RAND_load_file; ++ RAND_screen; ++ RAND_seed; ++ RAND_write_file; ++ RC2_cbc_encrypt; ++ RC2_cfb64_encrypt; ++ RC2_ecb_encrypt; ++ RC2_encrypt; ++ RC2_ofb64_encrypt; ++ RC2_set_key; ++ RC4; ++ RC4_options; ++ RC4_set_key; ++ RSAPrivateKey_asn1_meth; ++ RSAPrivateKey_dup; ++ RSAPublicKey_dup; ++ RSA_PKCS1_SSLeay; ++ RSA_free; ++ RSA_generate_key; ++ RSA_new; ++ RSA_new_method; ++ RSA_print; ++ RSA_print_fp; ++ RSA_private_decrypt; ++ RSA_private_encrypt; ++ RSA_public_decrypt; ++ RSA_public_encrypt; ++ RSA_set_default_method; ++ RSA_sign; ++ RSA_sign_ASN1_OCTET_STRING; ++ RSA_size; ++ RSA_verify; ++ RSA_verify_ASN1_OCTET_STRING; ++ SHA; ++ SHA1; ++ SHA1_Final; ++ SHA1_Init; ++ SHA1_Update; ++ SHA_Final; ++ SHA_Init; ++ SHA_Update; ++ OpenSSL_add_all_algorithms; ++ OpenSSL_add_all_ciphers; ++ OpenSSL_add_all_digests; ++ TXT_DB_create_index; ++ TXT_DB_free; ++ TXT_DB_get_by_index; ++ TXT_DB_insert; ++ TXT_DB_read; ++ TXT_DB_write; ++ X509_ALGOR_free; ++ X509_ALGOR_new; ++ X509_ATTRIBUTE_free; ++ X509_ATTRIBUTE_new; ++ X509_CINF_free; ++ X509_CINF_new; ++ X509_CRL_INFO_free; ++ X509_CRL_INFO_new; ++ X509_CRL_add_ext; ++ X509_CRL_cmp; ++ X509_CRL_delete_ext; ++ X509_CRL_dup; ++ X509_CRL_free; ++ X509_CRL_get_ext; ++ X509_CRL_get_ext_by_NID; ++ X509_CRL_get_ext_by_OBJ; ++ X509_CRL_get_ext_by_critical; ++ X509_CRL_get_ext_count; ++ X509_CRL_new; ++ X509_CRL_sign; ++ X509_CRL_verify; ++ X509_EXTENSION_create_by_NID; ++ X509_EXTENSION_create_by_OBJ; ++ X509_EXTENSION_dup; ++ X509_EXTENSION_free; ++ X509_EXTENSION_get_critical; ++ X509_EXTENSION_get_data; ++ X509_EXTENSION_get_object; ++ X509_EXTENSION_new; ++ X509_EXTENSION_set_critical; ++ X509_EXTENSION_set_data; ++ X509_EXTENSION_set_object; ++ X509_INFO_free; ++ X509_INFO_new; ++ X509_LOOKUP_by_alias; ++ X509_LOOKUP_by_fingerprint; ++ X509_LOOKUP_by_issuer_serial; ++ X509_LOOKUP_by_subject; ++ X509_LOOKUP_ctrl; ++ X509_LOOKUP_file; ++ X509_LOOKUP_free; ++ X509_LOOKUP_hash_dir; ++ X509_LOOKUP_init; ++ X509_LOOKUP_new; ++ X509_LOOKUP_shutdown; ++ X509_NAME_ENTRY_create_by_NID; ++ X509_NAME_ENTRY_create_by_OBJ; ++ X509_NAME_ENTRY_dup; ++ X509_NAME_ENTRY_free; ++ X509_NAME_ENTRY_get_data; ++ X509_NAME_ENTRY_get_object; ++ X509_NAME_ENTRY_new; ++ X509_NAME_ENTRY_set_data; ++ X509_NAME_ENTRY_set_object; ++ X509_NAME_add_entry; ++ X509_NAME_cmp; ++ X509_NAME_delete_entry; ++ X509_NAME_digest; ++ X509_NAME_dup; ++ X509_NAME_entry_count; ++ X509_NAME_free; ++ X509_NAME_get_entry; ++ X509_NAME_get_index_by_NID; ++ X509_NAME_get_index_by_OBJ; ++ X509_NAME_get_text_by_NID; ++ X509_NAME_get_text_by_OBJ; ++ X509_NAME_hash; ++ X509_NAME_new; ++ X509_NAME_oneline; ++ X509_NAME_print; ++ X509_NAME_set; ++ X509_OBJECT_free_contents; ++ X509_OBJECT_retrieve_by_subject; ++ X509_OBJECT_up_ref_count; ++ X509_PKEY_free; ++ X509_PKEY_new; ++ X509_PUBKEY_free; ++ X509_PUBKEY_get; ++ X509_PUBKEY_new; ++ X509_PUBKEY_set; ++ X509_REQ_INFO_free; ++ X509_REQ_INFO_new; ++ X509_REQ_dup; ++ X509_REQ_free; ++ X509_REQ_get_pubkey; ++ X509_REQ_new; ++ X509_REQ_print; ++ X509_REQ_print_fp; ++ X509_REQ_set_pubkey; ++ X509_REQ_set_subject_name; ++ X509_REQ_set_version; ++ X509_REQ_sign; ++ X509_REQ_to_X509; ++ X509_REQ_verify; ++ X509_REVOKED_add_ext; ++ X509_REVOKED_delete_ext; ++ X509_REVOKED_free; ++ X509_REVOKED_get_ext; ++ X509_REVOKED_get_ext_by_NID; ++ X509_REVOKED_get_ext_by_OBJ; ++ X509_REVOKED_get_ext_by_critical; ++ X509_REVOKED_get_ext_by_critic; ++ X509_REVOKED_get_ext_count; ++ X509_REVOKED_new; ++ X509_SIG_free; ++ X509_SIG_new; ++ X509_STORE_CTX_cleanup; ++ X509_STORE_CTX_init; ++ X509_STORE_add_cert; ++ X509_STORE_add_lookup; ++ X509_STORE_free; ++ X509_STORE_get_by_subject; ++ X509_STORE_load_locations; ++ X509_STORE_new; ++ X509_STORE_set_default_paths; ++ X509_VAL_free; ++ X509_VAL_new; ++ X509_add_ext; ++ X509_asn1_meth; ++ X509_certificate_type; ++ X509_check_private_key; ++ X509_cmp_current_time; ++ X509_delete_ext; ++ X509_digest; ++ X509_dup; ++ X509_free; ++ X509_get_default_cert_area; ++ X509_get_default_cert_dir; ++ X509_get_default_cert_dir_env; ++ X509_get_default_cert_file; ++ X509_get_default_cert_file_env; ++ X509_get_default_private_dir; ++ X509_get_ext; ++ X509_get_ext_by_NID; ++ X509_get_ext_by_OBJ; ++ X509_get_ext_by_critical; ++ X509_get_ext_count; ++ X509_get_issuer_name; ++ X509_get_pubkey; ++ X509_get_pubkey_parameters; ++ X509_get_serialNumber; ++ X509_get_subject_name; ++ X509_gmtime_adj; ++ X509_issuer_and_serial_cmp; ++ X509_issuer_and_serial_hash; ++ X509_issuer_name_cmp; ++ X509_issuer_name_hash; ++ X509_load_cert_file; ++ X509_new; ++ X509_print; ++ X509_print_fp; ++ X509_set_issuer_name; ++ X509_set_notAfter; ++ X509_set_notBefore; ++ X509_set_pubkey; ++ X509_set_serialNumber; ++ X509_set_subject_name; ++ X509_set_version; ++ X509_sign; ++ X509_subject_name_cmp; ++ X509_subject_name_hash; ++ X509_to_X509_REQ; ++ X509_verify; ++ X509_verify_cert; ++ X509_verify_cert_error_string; ++ X509v3_add_ext; ++ X509v3_add_extension; ++ X509v3_add_netscape_extensions; ++ X509v3_add_standard_extensions; ++ X509v3_cleanup_extensions; ++ X509v3_data_type_by_NID; ++ X509v3_data_type_by_OBJ; ++ X509v3_delete_ext; ++ X509v3_get_ext; ++ X509v3_get_ext_by_NID; ++ X509v3_get_ext_by_OBJ; ++ X509v3_get_ext_by_critical; ++ X509v3_get_ext_count; ++ X509v3_pack_string; ++ X509v3_pack_type_by_NID; ++ X509v3_pack_type_by_OBJ; ++ X509v3_unpack_string; ++ _des_crypt; ++ a2d_ASN1_OBJECT; ++ a2i_ASN1_INTEGER; ++ a2i_ASN1_STRING; ++ asn1_Finish; ++ asn1_GetSequence; ++ bn_div_words; ++ bn_expand2; ++ bn_mul_add_words; ++ bn_mul_words; ++ BN_uadd; ++ BN_usub; ++ bn_sqr_words; ++ _ossl_old_crypt; ++ d2i_ASN1_BIT_STRING; ++ d2i_ASN1_BOOLEAN; ++ d2i_ASN1_HEADER; ++ d2i_ASN1_IA5STRING; ++ d2i_ASN1_INTEGER; ++ d2i_ASN1_OBJECT; ++ d2i_ASN1_OCTET_STRING; ++ d2i_ASN1_PRINTABLE; ++ d2i_ASN1_PRINTABLESTRING; ++ d2i_ASN1_SET; ++ d2i_ASN1_T61STRING; ++ d2i_ASN1_TYPE; ++ d2i_ASN1_UTCTIME; ++ d2i_ASN1_bytes; ++ d2i_ASN1_type_bytes; ++ d2i_DHparams; ++ d2i_DSAPrivateKey; ++ d2i_DSAPrivateKey_bio; ++ d2i_DSAPrivateKey_fp; ++ d2i_DSAPublicKey; ++ d2i_DSAparams; ++ d2i_NETSCAPE_SPKAC; ++ d2i_NETSCAPE_SPKI; ++ d2i_Netscape_RSA; ++ d2i_PKCS7; ++ d2i_PKCS7_DIGEST; ++ d2i_PKCS7_ENCRYPT; ++ d2i_PKCS7_ENC_CONTENT; ++ d2i_PKCS7_ENVELOPE; ++ d2i_PKCS7_ISSUER_AND_SERIAL; ++ d2i_PKCS7_RECIP_INFO; ++ d2i_PKCS7_SIGNED; ++ d2i_PKCS7_SIGNER_INFO; ++ d2i_PKCS7_SIGN_ENVELOPE; ++ d2i_PKCS7_bio; ++ d2i_PKCS7_fp; ++ d2i_PrivateKey; ++ d2i_PublicKey; ++ d2i_RSAPrivateKey; ++ d2i_RSAPrivateKey_bio; ++ d2i_RSAPrivateKey_fp; ++ d2i_RSAPublicKey; ++ d2i_X509; ++ d2i_X509_ALGOR; ++ d2i_X509_ATTRIBUTE; ++ d2i_X509_CINF; ++ d2i_X509_CRL; ++ d2i_X509_CRL_INFO; ++ d2i_X509_CRL_bio; ++ d2i_X509_CRL_fp; ++ d2i_X509_EXTENSION; ++ d2i_X509_NAME; ++ d2i_X509_NAME_ENTRY; ++ d2i_X509_PKEY; ++ d2i_X509_PUBKEY; ++ d2i_X509_REQ; ++ d2i_X509_REQ_INFO; ++ d2i_X509_REQ_bio; ++ d2i_X509_REQ_fp; ++ d2i_X509_REVOKED; ++ d2i_X509_SIG; ++ d2i_X509_VAL; ++ d2i_X509_bio; ++ d2i_X509_fp; ++ DES_cbc_cksum; ++ DES_cbc_encrypt; ++ DES_cblock_print_file; ++ DES_cfb64_encrypt; ++ DES_cfb_encrypt; ++ DES_decrypt3; ++ DES_ecb3_encrypt; ++ DES_ecb_encrypt; ++ DES_ede3_cbc_encrypt; ++ DES_ede3_cfb64_encrypt; ++ DES_ede3_ofb64_encrypt; ++ DES_enc_read; ++ DES_enc_write; ++ DES_encrypt1; ++ DES_encrypt2; ++ DES_encrypt3; ++ DES_fcrypt; ++ DES_is_weak_key; ++ DES_key_sched; ++ DES_ncbc_encrypt; ++ DES_ofb64_encrypt; ++ DES_ofb_encrypt; ++ DES_options; ++ DES_pcbc_encrypt; ++ DES_quad_cksum; ++ DES_random_key; ++ _ossl_old_des_random_seed; ++ _ossl_old_des_read_2passwords; ++ _ossl_old_des_read_password; ++ _ossl_old_des_read_pw; ++ _ossl_old_des_read_pw_string; ++ DES_set_key; ++ DES_set_odd_parity; ++ DES_string_to_2keys; ++ DES_string_to_key; ++ DES_xcbc_encrypt; ++ DES_xwhite_in2out; ++ fcrypt_body; ++ i2a_ASN1_INTEGER; ++ i2a_ASN1_OBJECT; ++ i2a_ASN1_STRING; ++ i2d_ASN1_BIT_STRING; ++ i2d_ASN1_BOOLEAN; ++ i2d_ASN1_HEADER; ++ i2d_ASN1_IA5STRING; ++ i2d_ASN1_INTEGER; ++ i2d_ASN1_OBJECT; ++ i2d_ASN1_OCTET_STRING; ++ i2d_ASN1_PRINTABLE; ++ i2d_ASN1_SET; ++ i2d_ASN1_TYPE; ++ i2d_ASN1_UTCTIME; ++ i2d_ASN1_bytes; ++ i2d_DHparams; ++ i2d_DSAPrivateKey; ++ i2d_DSAPrivateKey_bio; ++ i2d_DSAPrivateKey_fp; ++ i2d_DSAPublicKey; ++ i2d_DSAparams; ++ i2d_NETSCAPE_SPKAC; ++ i2d_NETSCAPE_SPKI; ++ i2d_Netscape_RSA; ++ i2d_PKCS7; ++ i2d_PKCS7_DIGEST; ++ i2d_PKCS7_ENCRYPT; ++ i2d_PKCS7_ENC_CONTENT; ++ i2d_PKCS7_ENVELOPE; ++ i2d_PKCS7_ISSUER_AND_SERIAL; ++ i2d_PKCS7_RECIP_INFO; ++ i2d_PKCS7_SIGNED; ++ i2d_PKCS7_SIGNER_INFO; ++ i2d_PKCS7_SIGN_ENVELOPE; ++ i2d_PKCS7_bio; ++ i2d_PKCS7_fp; ++ i2d_PrivateKey; ++ i2d_PublicKey; ++ i2d_RSAPrivateKey; ++ i2d_RSAPrivateKey_bio; ++ i2d_RSAPrivateKey_fp; ++ i2d_RSAPublicKey; ++ i2d_X509; ++ i2d_X509_ALGOR; ++ i2d_X509_ATTRIBUTE; ++ i2d_X509_CINF; ++ i2d_X509_CRL; ++ i2d_X509_CRL_INFO; ++ i2d_X509_CRL_bio; ++ i2d_X509_CRL_fp; ++ i2d_X509_EXTENSION; ++ i2d_X509_NAME; ++ i2d_X509_NAME_ENTRY; ++ i2d_X509_PKEY; ++ i2d_X509_PUBKEY; ++ i2d_X509_REQ; ++ i2d_X509_REQ_INFO; ++ i2d_X509_REQ_bio; ++ i2d_X509_REQ_fp; ++ i2d_X509_REVOKED; ++ i2d_X509_SIG; ++ i2d_X509_VAL; ++ i2d_X509_bio; ++ i2d_X509_fp; ++ idea_cbc_encrypt; ++ idea_cfb64_encrypt; ++ idea_ecb_encrypt; ++ idea_encrypt; ++ idea_ofb64_encrypt; ++ idea_options; ++ idea_set_decrypt_key; ++ idea_set_encrypt_key; ++ lh_delete; ++ lh_doall; ++ lh_doall_arg; ++ lh_free; ++ lh_insert; ++ lh_new; ++ lh_node_stats; ++ lh_node_stats_bio; ++ lh_node_usage_stats; ++ lh_node_usage_stats_bio; ++ lh_retrieve; ++ lh_stats; ++ lh_stats_bio; ++ lh_strhash; ++ sk_delete; ++ sk_delete_ptr; ++ sk_dup; ++ sk_find; ++ sk_free; ++ sk_insert; ++ sk_new; ++ sk_pop; ++ sk_pop_free; ++ sk_push; ++ sk_set_cmp_func; ++ sk_shift; ++ sk_unshift; ++ sk_zero; ++ BIO_f_nbio_test; ++ ASN1_TYPE_get; ++ ASN1_TYPE_set; ++ PKCS7_content_free; ++ ERR_load_PKCS7_strings; ++ X509_find_by_issuer_and_serial; ++ X509_find_by_subject; ++ PKCS7_ctrl; ++ PKCS7_set_type; ++ PKCS7_set_content; ++ PKCS7_SIGNER_INFO_set; ++ PKCS7_add_signer; ++ PKCS7_add_certificate; ++ PKCS7_add_crl; ++ PKCS7_content_new; ++ PKCS7_dataSign; ++ PKCS7_dataVerify; ++ PKCS7_dataInit; ++ PKCS7_add_signature; ++ PKCS7_cert_from_signer_info; ++ PKCS7_get_signer_info; ++ EVP_delete_alias; ++ EVP_mdc2; ++ PEM_read_bio_RSAPublicKey; ++ PEM_write_bio_RSAPublicKey; ++ d2i_RSAPublicKey_bio; ++ i2d_RSAPublicKey_bio; ++ PEM_read_RSAPublicKey; ++ PEM_write_RSAPublicKey; ++ d2i_RSAPublicKey_fp; ++ i2d_RSAPublicKey_fp; ++ BIO_copy_next_retry; ++ RSA_flags; ++ X509_STORE_add_crl; ++ X509_load_crl_file; ++ EVP_rc2_40_cbc; ++ EVP_rc4_40; ++ EVP_CIPHER_CTX_init; ++ HMAC; ++ HMAC_Init; ++ HMAC_Update; ++ HMAC_Final; ++ ERR_get_next_error_library; ++ EVP_PKEY_cmp_parameters; ++ HMAC_cleanup; ++ BIO_ptr_ctrl; ++ BIO_new_file_internal; ++ BIO_new_fp_internal; ++ BIO_s_file_internal; ++ BN_BLINDING_convert; ++ BN_BLINDING_invert; ++ BN_BLINDING_update; ++ RSA_blinding_on; ++ RSA_blinding_off; ++ i2t_ASN1_OBJECT; ++ BN_BLINDING_new; ++ BN_BLINDING_free; ++ EVP_cast5_cbc; ++ EVP_cast5_cfb64; ++ EVP_cast5_ecb; ++ EVP_cast5_ofb; ++ BF_decrypt; ++ CAST_set_key; ++ CAST_encrypt; ++ CAST_decrypt; ++ CAST_ecb_encrypt; ++ CAST_cbc_encrypt; ++ CAST_cfb64_encrypt; ++ CAST_ofb64_encrypt; ++ RC2_decrypt; ++ OBJ_create_objects; ++ BN_exp; ++ BN_mul_word; ++ BN_sub_word; ++ BN_dec2bn; ++ BN_bn2dec; ++ BIO_ghbn_ctrl; ++ CRYPTO_free_ex_data; ++ CRYPTO_get_ex_data; ++ CRYPTO_set_ex_data; ++ ERR_load_CRYPTO_strings; ++ ERR_load_CRYPTOlib_strings; ++ EVP_PKEY_bits; ++ MD5_Transform; ++ SHA1_Transform; ++ SHA_Transform; ++ X509_STORE_CTX_get_chain; ++ X509_STORE_CTX_get_current_cert; ++ X509_STORE_CTX_get_error; ++ X509_STORE_CTX_get_error_depth; ++ X509_STORE_CTX_get_ex_data; ++ X509_STORE_CTX_set_cert; ++ X509_STORE_CTX_set_chain; ++ X509_STORE_CTX_set_error; ++ X509_STORE_CTX_set_ex_data; ++ CRYPTO_dup_ex_data; ++ CRYPTO_get_new_lockid; ++ CRYPTO_new_ex_data; ++ RSA_set_ex_data; ++ RSA_get_ex_data; ++ RSA_get_ex_new_index; ++ RSA_padding_add_PKCS1_type_1; ++ RSA_padding_add_PKCS1_type_2; ++ RSA_padding_add_SSLv23; ++ RSA_padding_add_none; ++ RSA_padding_check_PKCS1_type_1; ++ RSA_padding_check_PKCS1_type_2; ++ RSA_padding_check_SSLv23; ++ RSA_padding_check_none; ++ bn_add_words; ++ d2i_Netscape_RSA_2; ++ CRYPTO_get_ex_new_index; ++ RIPEMD160_Init; ++ RIPEMD160_Update; ++ RIPEMD160_Final; ++ RIPEMD160; ++ RIPEMD160_Transform; ++ RC5_32_set_key; ++ RC5_32_ecb_encrypt; ++ RC5_32_encrypt; ++ RC5_32_decrypt; ++ RC5_32_cbc_encrypt; ++ RC5_32_cfb64_encrypt; ++ RC5_32_ofb64_encrypt; ++ BN_bn2mpi; ++ BN_mpi2bn; ++ ASN1_BIT_STRING_get_bit; ++ ASN1_BIT_STRING_set_bit; ++ BIO_get_ex_data; ++ BIO_get_ex_new_index; ++ BIO_set_ex_data; ++ X509v3_get_key_usage; ++ X509v3_set_key_usage; ++ a2i_X509v3_key_usage; ++ i2a_X509v3_key_usage; ++ EVP_PKEY_decrypt; ++ EVP_PKEY_encrypt; ++ PKCS7_RECIP_INFO_set; ++ PKCS7_add_recipient; ++ PKCS7_add_recipient_info; ++ PKCS7_set_cipher; ++ ASN1_TYPE_get_int_octetstring; ++ ASN1_TYPE_get_octetstring; ++ ASN1_TYPE_set_int_octetstring; ++ ASN1_TYPE_set_octetstring; ++ ASN1_UTCTIME_set_string; ++ ERR_add_error_data; ++ ERR_set_error_data; ++ EVP_CIPHER_asn1_to_param; ++ EVP_CIPHER_param_to_asn1; ++ EVP_CIPHER_get_asn1_iv; ++ EVP_CIPHER_set_asn1_iv; ++ EVP_rc5_32_12_16_cbc; ++ EVP_rc5_32_12_16_cfb64; ++ EVP_rc5_32_12_16_ecb; ++ EVP_rc5_32_12_16_ofb; ++ asn1_add_error; ++ d2i_ASN1_BMPSTRING; ++ i2d_ASN1_BMPSTRING; ++ BIO_f_ber; ++ BN_init; ++ COMP_CTX_new; ++ COMP_CTX_free; ++ COMP_CTX_compress_block; ++ COMP_CTX_expand_block; ++ X509_STORE_CTX_get_ex_new_index; ++ OBJ_NAME_add; ++ BIO_socket_nbio; ++ EVP_rc2_64_cbc; ++ OBJ_NAME_cleanup; ++ OBJ_NAME_get; ++ OBJ_NAME_init; ++ OBJ_NAME_new_index; ++ OBJ_NAME_remove; ++ BN_MONT_CTX_copy; ++ BIO_new_socks4a_connect; ++ BIO_s_socks4a_connect; ++ PROXY_set_connect_mode; ++ RAND_SSLeay; ++ RAND_set_rand_method; ++ RSA_memory_lock; ++ bn_sub_words; ++ bn_mul_normal; ++ bn_mul_comba8; ++ bn_mul_comba4; ++ bn_sqr_normal; ++ bn_sqr_comba8; ++ bn_sqr_comba4; ++ bn_cmp_words; ++ bn_mul_recursive; ++ bn_mul_part_recursive; ++ bn_sqr_recursive; ++ bn_mul_low_normal; ++ BN_RECP_CTX_init; ++ BN_RECP_CTX_new; ++ BN_RECP_CTX_free; ++ BN_RECP_CTX_set; ++ BN_mod_mul_reciprocal; ++ BN_mod_exp_recp; ++ BN_div_recp; ++ BN_CTX_init; ++ BN_MONT_CTX_init; ++ RAND_get_rand_method; ++ PKCS7_add_attribute; ++ PKCS7_add_signed_attribute; ++ PKCS7_digest_from_attributes; ++ PKCS7_get_attribute; ++ PKCS7_get_issuer_and_serial; ++ PKCS7_get_signed_attribute; ++ COMP_compress_block; ++ COMP_expand_block; ++ COMP_rle; ++ COMP_zlib; ++ ms_time_diff; ++ ms_time_new; ++ ms_time_free; ++ ms_time_cmp; ++ ms_time_get; ++ PKCS7_set_attributes; ++ PKCS7_set_signed_attributes; ++ X509_ATTRIBUTE_create; ++ X509_ATTRIBUTE_dup; ++ ASN1_GENERALIZEDTIME_check; ++ ASN1_GENERALIZEDTIME_print; ++ ASN1_GENERALIZEDTIME_set; ++ ASN1_GENERALIZEDTIME_set_string; ++ ASN1_TIME_print; ++ BASIC_CONSTRAINTS_free; ++ BASIC_CONSTRAINTS_new; ++ ERR_load_X509V3_strings; ++ NETSCAPE_CERT_SEQUENCE_free; ++ NETSCAPE_CERT_SEQUENCE_new; ++ OBJ_txt2obj; ++ PEM_read_NETSCAPE_CERT_SEQUENCE; ++ PEM_read_NS_CERT_SEQ; ++ PEM_read_bio_NETSCAPE_CERT_SEQUENCE; ++ PEM_read_bio_NS_CERT_SEQ; ++ PEM_write_NETSCAPE_CERT_SEQUENCE; ++ PEM_write_NS_CERT_SEQ; ++ PEM_write_bio_NETSCAPE_CERT_SEQUENCE; ++ PEM_write_bio_NS_CERT_SEQ; ++ X509V3_EXT_add; ++ X509V3_EXT_add_alias; ++ X509V3_EXT_add_conf; ++ X509V3_EXT_cleanup; ++ X509V3_EXT_conf; ++ X509V3_EXT_conf_nid; ++ X509V3_EXT_get; ++ X509V3_EXT_get_nid; ++ X509V3_EXT_print; ++ X509V3_EXT_print_fp; ++ X509V3_add_standard_extensions; ++ X509V3_add_value; ++ X509V3_add_value_bool; ++ X509V3_add_value_int; ++ X509V3_conf_free; ++ X509V3_get_value_bool; ++ X509V3_get_value_int; ++ X509V3_parse_list; ++ d2i_ASN1_GENERALIZEDTIME; ++ d2i_ASN1_TIME; ++ d2i_BASIC_CONSTRAINTS; ++ d2i_NETSCAPE_CERT_SEQUENCE; ++ d2i_ext_ku; ++ ext_ku_free; ++ ext_ku_new; ++ i2d_ASN1_GENERALIZEDTIME; ++ i2d_ASN1_TIME; ++ i2d_BASIC_CONSTRAINTS; ++ i2d_NETSCAPE_CERT_SEQUENCE; ++ i2d_ext_ku; ++ EVP_MD_CTX_copy; ++ i2d_ASN1_ENUMERATED; ++ d2i_ASN1_ENUMERATED; ++ ASN1_ENUMERATED_set; ++ ASN1_ENUMERATED_get; ++ BN_to_ASN1_ENUMERATED; ++ ASN1_ENUMERATED_to_BN; ++ i2a_ASN1_ENUMERATED; ++ a2i_ASN1_ENUMERATED; ++ i2d_GENERAL_NAME; ++ d2i_GENERAL_NAME; ++ GENERAL_NAME_new; ++ GENERAL_NAME_free; ++ GENERAL_NAMES_new; ++ GENERAL_NAMES_free; ++ d2i_GENERAL_NAMES; ++ i2d_GENERAL_NAMES; ++ i2v_GENERAL_NAMES; ++ i2s_ASN1_OCTET_STRING; ++ s2i_ASN1_OCTET_STRING; ++ X509V3_EXT_check_conf; ++ hex_to_string; ++ string_to_hex; ++ DES_ede3_cbcm_encrypt; ++ RSA_padding_add_PKCS1_OAEP; ++ RSA_padding_check_PKCS1_OAEP; ++ X509_CRL_print_fp; ++ X509_CRL_print; ++ i2v_GENERAL_NAME; ++ v2i_GENERAL_NAME; ++ i2d_PKEY_USAGE_PERIOD; ++ d2i_PKEY_USAGE_PERIOD; ++ PKEY_USAGE_PERIOD_new; ++ PKEY_USAGE_PERIOD_free; ++ v2i_GENERAL_NAMES; ++ i2s_ASN1_INTEGER; ++ X509V3_EXT_d2i; ++ name_cmp; ++ str_dup; ++ i2s_ASN1_ENUMERATED; ++ i2s_ASN1_ENUMERATED_TABLE; ++ BIO_s_log; ++ BIO_f_reliable; ++ PKCS7_dataFinal; ++ PKCS7_dataDecode; ++ X509V3_EXT_CRL_add_conf; ++ BN_set_params; ++ BN_get_params; ++ BIO_get_ex_num; ++ BIO_set_ex_free_func; ++ EVP_ripemd160; ++ ASN1_TIME_set; ++ i2d_AUTHORITY_KEYID; ++ d2i_AUTHORITY_KEYID; ++ AUTHORITY_KEYID_new; ++ AUTHORITY_KEYID_free; ++ ASN1_seq_unpack; ++ ASN1_seq_pack; ++ ASN1_unpack_string; ++ ASN1_pack_string; ++ PKCS12_pack_safebag; ++ PKCS12_MAKE_KEYBAG; ++ PKCS8_encrypt; ++ PKCS12_MAKE_SHKEYBAG; ++ PKCS12_pack_p7data; ++ PKCS12_pack_p7encdata; ++ PKCS12_add_localkeyid; ++ PKCS12_add_friendlyname_asc; ++ PKCS12_add_friendlyname_uni; ++ PKCS12_get_friendlyname; ++ PKCS12_pbe_crypt; ++ PKCS12_decrypt_d2i; ++ PKCS12_i2d_encrypt; ++ PKCS12_init; ++ PKCS12_key_gen_asc; ++ PKCS12_key_gen_uni; ++ PKCS12_gen_mac; ++ PKCS12_verify_mac; ++ PKCS12_set_mac; ++ PKCS12_setup_mac; ++ OPENSSL_asc2uni; ++ OPENSSL_uni2asc; ++ i2d_PKCS12_BAGS; ++ PKCS12_BAGS_new; ++ d2i_PKCS12_BAGS; ++ PKCS12_BAGS_free; ++ i2d_PKCS12; ++ d2i_PKCS12; ++ PKCS12_new; ++ PKCS12_free; ++ i2d_PKCS12_MAC_DATA; ++ PKCS12_MAC_DATA_new; ++ d2i_PKCS12_MAC_DATA; ++ PKCS12_MAC_DATA_free; ++ i2d_PKCS12_SAFEBAG; ++ PKCS12_SAFEBAG_new; ++ d2i_PKCS12_SAFEBAG; ++ PKCS12_SAFEBAG_free; ++ ERR_load_PKCS12_strings; ++ PKCS12_PBE_add; ++ PKCS8_add_keyusage; ++ PKCS12_get_attr_gen; ++ PKCS12_parse; ++ PKCS12_create; ++ i2d_PKCS12_bio; ++ i2d_PKCS12_fp; ++ d2i_PKCS12_bio; ++ d2i_PKCS12_fp; ++ i2d_PBEPARAM; ++ PBEPARAM_new; ++ d2i_PBEPARAM; ++ PBEPARAM_free; ++ i2d_PKCS8_PRIV_KEY_INFO; ++ PKCS8_PRIV_KEY_INFO_new; ++ d2i_PKCS8_PRIV_KEY_INFO; ++ PKCS8_PRIV_KEY_INFO_free; ++ EVP_PKCS82PKEY; ++ EVP_PKEY2PKCS8; ++ PKCS8_set_broken; ++ EVP_PBE_ALGOR_CipherInit; ++ EVP_PBE_alg_add; ++ PKCS5_pbe_set; ++ EVP_PBE_cleanup; ++ i2d_SXNET; ++ d2i_SXNET; ++ SXNET_new; ++ SXNET_free; ++ i2d_SXNETID; ++ d2i_SXNETID; ++ SXNETID_new; ++ SXNETID_free; ++ DSA_SIG_new; ++ DSA_SIG_free; ++ DSA_do_sign; ++ DSA_do_verify; ++ d2i_DSA_SIG; ++ i2d_DSA_SIG; ++ i2d_ASN1_VISIBLESTRING; ++ d2i_ASN1_VISIBLESTRING; ++ i2d_ASN1_UTF8STRING; ++ d2i_ASN1_UTF8STRING; ++ i2d_DIRECTORYSTRING; ++ d2i_DIRECTORYSTRING; ++ i2d_DISPLAYTEXT; ++ d2i_DISPLAYTEXT; ++ d2i_ASN1_SET_OF_X509; ++ i2d_ASN1_SET_OF_X509; ++ i2d_PBKDF2PARAM; ++ PBKDF2PARAM_new; ++ d2i_PBKDF2PARAM; ++ PBKDF2PARAM_free; ++ i2d_PBE2PARAM; ++ PBE2PARAM_new; ++ d2i_PBE2PARAM; ++ PBE2PARAM_free; ++ d2i_ASN1_SET_OF_GENERAL_NAME; ++ i2d_ASN1_SET_OF_GENERAL_NAME; ++ d2i_ASN1_SET_OF_SXNETID; ++ i2d_ASN1_SET_OF_SXNETID; ++ d2i_ASN1_SET_OF_POLICYQUALINFO; ++ i2d_ASN1_SET_OF_POLICYQUALINFO; ++ d2i_ASN1_SET_OF_POLICYINFO; ++ i2d_ASN1_SET_OF_POLICYINFO; ++ SXNET_add_id_asc; ++ SXNET_add_id_ulong; ++ SXNET_add_id_INTEGER; ++ SXNET_get_id_asc; ++ SXNET_get_id_ulong; ++ SXNET_get_id_INTEGER; ++ X509V3_set_conf_lhash; ++ i2d_CERTIFICATEPOLICIES; ++ CERTIFICATEPOLICIES_new; ++ CERTIFICATEPOLICIES_free; ++ d2i_CERTIFICATEPOLICIES; ++ i2d_POLICYINFO; ++ POLICYINFO_new; ++ d2i_POLICYINFO; ++ POLICYINFO_free; ++ i2d_POLICYQUALINFO; ++ POLICYQUALINFO_new; ++ d2i_POLICYQUALINFO; ++ POLICYQUALINFO_free; ++ i2d_USERNOTICE; ++ USERNOTICE_new; ++ d2i_USERNOTICE; ++ USERNOTICE_free; ++ i2d_NOTICEREF; ++ NOTICEREF_new; ++ d2i_NOTICEREF; ++ NOTICEREF_free; ++ X509V3_get_string; ++ X509V3_get_section; ++ X509V3_string_free; ++ X509V3_section_free; ++ X509V3_set_ctx; ++ s2i_ASN1_INTEGER; ++ CRYPTO_set_locked_mem_functions; ++ CRYPTO_get_locked_mem_functions; ++ CRYPTO_malloc_locked; ++ CRYPTO_free_locked; ++ BN_mod_exp2_mont; ++ ERR_get_error_line_data; ++ ERR_peek_error_line_data; ++ PKCS12_PBE_keyivgen; ++ X509_ALGOR_dup; ++ d2i_ASN1_SET_OF_DIST_POINT; ++ i2d_ASN1_SET_OF_DIST_POINT; ++ i2d_CRL_DIST_POINTS; ++ CRL_DIST_POINTS_new; ++ CRL_DIST_POINTS_free; ++ d2i_CRL_DIST_POINTS; ++ i2d_DIST_POINT; ++ DIST_POINT_new; ++ d2i_DIST_POINT; ++ DIST_POINT_free; ++ i2d_DIST_POINT_NAME; ++ DIST_POINT_NAME_new; ++ DIST_POINT_NAME_free; ++ d2i_DIST_POINT_NAME; ++ X509V3_add_value_uchar; ++ d2i_ASN1_SET_OF_X509_ATTRIBUTE; ++ i2d_ASN1_SET_OF_ASN1_TYPE; ++ d2i_ASN1_SET_OF_X509_EXTENSION; ++ d2i_ASN1_SET_OF_X509_NAME_ENTRY; ++ d2i_ASN1_SET_OF_ASN1_TYPE; ++ i2d_ASN1_SET_OF_X509_ATTRIBUTE; ++ i2d_ASN1_SET_OF_X509_EXTENSION; ++ i2d_ASN1_SET_OF_X509_NAME_ENTRY; ++ X509V3_EXT_i2d; ++ X509V3_EXT_val_prn; ++ X509V3_EXT_add_list; ++ EVP_CIPHER_type; ++ EVP_PBE_CipherInit; ++ X509V3_add_value_bool_nf; ++ d2i_ASN1_UINTEGER; ++ sk_value; ++ sk_num; ++ sk_set; ++ i2d_ASN1_SET_OF_X509_REVOKED; ++ sk_sort; ++ d2i_ASN1_SET_OF_X509_REVOKED; ++ i2d_ASN1_SET_OF_X509_ALGOR; ++ i2d_ASN1_SET_OF_X509_CRL; ++ d2i_ASN1_SET_OF_X509_ALGOR; ++ d2i_ASN1_SET_OF_X509_CRL; ++ i2d_ASN1_SET_OF_PKCS7_SIGNER_INFO; ++ i2d_ASN1_SET_OF_PKCS7_RECIP_INFO; ++ d2i_ASN1_SET_OF_PKCS7_SIGNER_INFO; ++ d2i_ASN1_SET_OF_PKCS7_RECIP_INFO; ++ PKCS5_PBE_add; ++ PEM_write_bio_PKCS8; ++ i2d_PKCS8_fp; ++ PEM_read_bio_PKCS8_PRIV_KEY_INFO; ++ PEM_read_bio_P8_PRIV_KEY_INFO; ++ d2i_PKCS8_bio; ++ d2i_PKCS8_PRIV_KEY_INFO_fp; ++ PEM_write_bio_PKCS8_PRIV_KEY_INFO; ++ PEM_write_bio_P8_PRIV_KEY_INFO; ++ PEM_read_PKCS8; ++ d2i_PKCS8_PRIV_KEY_INFO_bio; ++ d2i_PKCS8_fp; ++ PEM_write_PKCS8; ++ PEM_read_PKCS8_PRIV_KEY_INFO; ++ PEM_read_P8_PRIV_KEY_INFO; ++ PEM_read_bio_PKCS8; ++ PEM_write_PKCS8_PRIV_KEY_INFO; ++ PEM_write_P8_PRIV_KEY_INFO; ++ PKCS5_PBE_keyivgen; ++ i2d_PKCS8_bio; ++ i2d_PKCS8_PRIV_KEY_INFO_fp; ++ i2d_PKCS8_PRIV_KEY_INFO_bio; ++ BIO_s_bio; ++ PKCS5_pbe2_set; ++ PKCS5_PBKDF2_HMAC_SHA1; ++ PKCS5_v2_PBE_keyivgen; ++ PEM_write_bio_PKCS8PrivateKey; ++ PEM_write_PKCS8PrivateKey; ++ BIO_ctrl_get_read_request; ++ BIO_ctrl_pending; ++ BIO_ctrl_wpending; ++ BIO_new_bio_pair; ++ BIO_ctrl_get_write_guarantee; ++ CRYPTO_num_locks; ++ CONF_load_bio; ++ CONF_load_fp; ++ i2d_ASN1_SET_OF_ASN1_OBJECT; ++ d2i_ASN1_SET_OF_ASN1_OBJECT; ++ PKCS7_signatureVerify; ++ RSA_set_method; ++ RSA_get_method; ++ RSA_get_default_method; ++ RSA_check_key; ++ OBJ_obj2txt; ++ DSA_dup_DH; ++ X509_REQ_get_extensions; ++ X509_REQ_set_extension_nids; ++ BIO_nwrite; ++ X509_REQ_extension_nid; ++ BIO_nread; ++ X509_REQ_get_extension_nids; ++ BIO_nwrite0; ++ X509_REQ_add_extensions_nid; ++ BIO_nread0; ++ X509_REQ_add_extensions; ++ BIO_new_mem_buf; ++ DH_set_ex_data; ++ DH_set_method; ++ DSA_OpenSSL; ++ DH_get_ex_data; ++ DH_get_ex_new_index; ++ DSA_new_method; ++ DH_new_method; ++ DH_OpenSSL; ++ DSA_get_ex_new_index; ++ DH_get_default_method; ++ DSA_set_ex_data; ++ DH_set_default_method; ++ DSA_get_ex_data; ++ X509V3_EXT_REQ_add_conf; ++ NETSCAPE_SPKI_print; ++ NETSCAPE_SPKI_set_pubkey; ++ NETSCAPE_SPKI_b64_encode; ++ NETSCAPE_SPKI_get_pubkey; ++ NETSCAPE_SPKI_b64_decode; ++ UTF8_putc; ++ UTF8_getc; ++ RSA_null_method; ++ ASN1_tag2str; ++ BIO_ctrl_reset_read_request; ++ DISPLAYTEXT_new; ++ ASN1_GENERALIZEDTIME_free; ++ X509_REVOKED_get_ext_d2i; ++ X509_set_ex_data; ++ X509_reject_set_bit_asc; ++ X509_NAME_add_entry_by_txt; ++ X509_NAME_add_entry_by_NID; ++ X509_PURPOSE_get0; ++ PEM_read_X509_AUX; ++ d2i_AUTHORITY_INFO_ACCESS; ++ PEM_write_PUBKEY; ++ ACCESS_DESCRIPTION_new; ++ X509_CERT_AUX_free; ++ d2i_ACCESS_DESCRIPTION; ++ X509_trust_clear; ++ X509_TRUST_add; ++ ASN1_VISIBLESTRING_new; ++ X509_alias_set1; ++ ASN1_PRINTABLESTRING_free; ++ EVP_PKEY_get1_DSA; ++ ASN1_BMPSTRING_new; ++ ASN1_mbstring_copy; ++ ASN1_UTF8STRING_new; ++ DSA_get_default_method; ++ i2d_ASN1_SET_OF_ACCESS_DESCRIPTION; ++ ASN1_T61STRING_free; ++ DSA_set_method; ++ X509_get_ex_data; ++ ASN1_STRING_type; ++ X509_PURPOSE_get_by_sname; ++ ASN1_TIME_free; ++ ASN1_OCTET_STRING_cmp; ++ ASN1_BIT_STRING_new; ++ X509_get_ext_d2i; ++ PEM_read_bio_X509_AUX; ++ ASN1_STRING_set_default_mask_asc; ++ ASN1_STRING_set_def_mask_asc; ++ PEM_write_bio_RSA_PUBKEY; ++ ASN1_INTEGER_cmp; ++ d2i_RSA_PUBKEY_fp; ++ X509_trust_set_bit_asc; ++ PEM_write_bio_DSA_PUBKEY; ++ X509_STORE_CTX_free; ++ EVP_PKEY_set1_DSA; ++ i2d_DSA_PUBKEY_fp; ++ X509_load_cert_crl_file; ++ ASN1_TIME_new; ++ i2d_RSA_PUBKEY; ++ X509_STORE_CTX_purpose_inherit; ++ PEM_read_RSA_PUBKEY; ++ d2i_X509_AUX; ++ i2d_DSA_PUBKEY; ++ X509_CERT_AUX_print; ++ PEM_read_DSA_PUBKEY; ++ i2d_RSA_PUBKEY_bio; ++ ASN1_BIT_STRING_num_asc; ++ i2d_PUBKEY; ++ ASN1_UTCTIME_free; ++ DSA_set_default_method; ++ X509_PURPOSE_get_by_id; ++ ACCESS_DESCRIPTION_free; ++ PEM_read_bio_PUBKEY; ++ ASN1_STRING_set_by_NID; ++ X509_PURPOSE_get_id; ++ DISPLAYTEXT_free; ++ OTHERNAME_new; ++ X509_CERT_AUX_new; ++ X509_TRUST_cleanup; ++ X509_NAME_add_entry_by_OBJ; ++ X509_CRL_get_ext_d2i; ++ X509_PURPOSE_get0_name; ++ PEM_read_PUBKEY; ++ i2d_DSA_PUBKEY_bio; ++ i2d_OTHERNAME; ++ ASN1_OCTET_STRING_free; ++ ASN1_BIT_STRING_set_asc; ++ X509_get_ex_new_index; ++ ASN1_STRING_TABLE_cleanup; ++ X509_TRUST_get_by_id; ++ X509_PURPOSE_get_trust; ++ ASN1_STRING_length; ++ d2i_ASN1_SET_OF_ACCESS_DESCRIPTION; ++ ASN1_PRINTABLESTRING_new; ++ X509V3_get_d2i; ++ ASN1_ENUMERATED_free; ++ i2d_X509_CERT_AUX; ++ X509_STORE_CTX_set_trust; ++ ASN1_STRING_set_default_mask; ++ X509_STORE_CTX_new; ++ EVP_PKEY_get1_RSA; ++ DIRECTORYSTRING_free; ++ PEM_write_X509_AUX; ++ ASN1_OCTET_STRING_set; ++ d2i_DSA_PUBKEY_fp; ++ d2i_RSA_PUBKEY; ++ X509_TRUST_get0_name; ++ X509_TRUST_get0; ++ AUTHORITY_INFO_ACCESS_free; ++ ASN1_IA5STRING_new; ++ d2i_DSA_PUBKEY; ++ X509_check_purpose; ++ ASN1_ENUMERATED_new; ++ d2i_RSA_PUBKEY_bio; ++ d2i_PUBKEY; ++ X509_TRUST_get_trust; ++ X509_TRUST_get_flags; ++ ASN1_BMPSTRING_free; ++ ASN1_T61STRING_new; ++ ASN1_UTCTIME_new; ++ i2d_AUTHORITY_INFO_ACCESS; ++ EVP_PKEY_set1_RSA; ++ X509_STORE_CTX_set_purpose; ++ ASN1_IA5STRING_free; ++ PEM_write_bio_X509_AUX; ++ X509_PURPOSE_get_count; ++ CRYPTO_add_info; ++ X509_NAME_ENTRY_create_by_txt; ++ ASN1_STRING_get_default_mask; ++ X509_alias_get0; ++ ASN1_STRING_data; ++ i2d_ACCESS_DESCRIPTION; ++ X509_trust_set_bit; ++ ASN1_BIT_STRING_free; ++ PEM_read_bio_RSA_PUBKEY; ++ X509_add1_reject_object; ++ X509_check_trust; ++ PEM_read_bio_DSA_PUBKEY; ++ X509_PURPOSE_add; ++ ASN1_STRING_TABLE_get; ++ ASN1_UTF8STRING_free; ++ d2i_DSA_PUBKEY_bio; ++ PEM_write_RSA_PUBKEY; ++ d2i_OTHERNAME; ++ X509_reject_set_bit; ++ PEM_write_DSA_PUBKEY; ++ X509_PURPOSE_get0_sname; ++ EVP_PKEY_set1_DH; ++ ASN1_OCTET_STRING_dup; ++ ASN1_BIT_STRING_set; ++ X509_TRUST_get_count; ++ ASN1_INTEGER_free; ++ OTHERNAME_free; ++ i2d_RSA_PUBKEY_fp; ++ ASN1_INTEGER_dup; ++ d2i_X509_CERT_AUX; ++ PEM_write_bio_PUBKEY; ++ ASN1_VISIBLESTRING_free; ++ X509_PURPOSE_cleanup; ++ ASN1_mbstring_ncopy; ++ ASN1_GENERALIZEDTIME_new; ++ EVP_PKEY_get1_DH; ++ ASN1_OCTET_STRING_new; ++ ASN1_INTEGER_new; ++ i2d_X509_AUX; ++ ASN1_BIT_STRING_name_print; ++ X509_cmp; ++ ASN1_STRING_length_set; ++ DIRECTORYSTRING_new; ++ X509_add1_trust_object; ++ PKCS12_newpass; ++ SMIME_write_PKCS7; ++ SMIME_read_PKCS7; ++ DES_set_key_checked; ++ PKCS7_verify; ++ PKCS7_encrypt; ++ DES_set_key_unchecked; ++ SMIME_crlf_copy; ++ i2d_ASN1_PRINTABLESTRING; ++ PKCS7_get0_signers; ++ PKCS7_decrypt; ++ SMIME_text; ++ PKCS7_simple_smimecap; ++ PKCS7_get_smimecap; ++ PKCS7_sign; ++ PKCS7_add_attrib_smimecap; ++ CRYPTO_dbg_set_options; ++ CRYPTO_remove_all_info; ++ CRYPTO_get_mem_debug_functions; ++ CRYPTO_is_mem_check_on; ++ CRYPTO_set_mem_debug_functions; ++ CRYPTO_pop_info; ++ CRYPTO_push_info_; ++ CRYPTO_set_mem_debug_options; ++ PEM_write_PKCS8PrivateKey_nid; ++ PEM_write_bio_PKCS8PrivateKey_nid; ++ PEM_write_bio_PKCS8PrivKey_nid; ++ d2i_PKCS8PrivateKey_bio; ++ ASN1_NULL_free; ++ d2i_ASN1_NULL; ++ ASN1_NULL_new; ++ i2d_PKCS8PrivateKey_bio; ++ i2d_PKCS8PrivateKey_fp; ++ i2d_ASN1_NULL; ++ i2d_PKCS8PrivateKey_nid_fp; ++ d2i_PKCS8PrivateKey_fp; ++ i2d_PKCS8PrivateKey_nid_bio; ++ i2d_PKCS8PrivateKeyInfo_fp; ++ i2d_PKCS8PrivateKeyInfo_bio; ++ PEM_cb; ++ i2d_PrivateKey_fp; ++ d2i_PrivateKey_bio; ++ d2i_PrivateKey_fp; ++ i2d_PrivateKey_bio; ++ X509_reject_clear; ++ X509_TRUST_set_default; ++ d2i_AutoPrivateKey; ++ X509_ATTRIBUTE_get0_type; ++ X509_ATTRIBUTE_set1_data; ++ X509at_get_attr; ++ X509at_get_attr_count; ++ X509_ATTRIBUTE_create_by_NID; ++ X509_ATTRIBUTE_set1_object; ++ X509_ATTRIBUTE_count; ++ X509_ATTRIBUTE_create_by_OBJ; ++ X509_ATTRIBUTE_get0_object; ++ X509at_get_attr_by_NID; ++ X509at_add1_attr; ++ X509_ATTRIBUTE_get0_data; ++ X509at_delete_attr; ++ X509at_get_attr_by_OBJ; ++ RAND_add; ++ BIO_number_written; ++ BIO_number_read; ++ X509_STORE_CTX_get1_chain; ++ ERR_load_RAND_strings; ++ RAND_pseudo_bytes; ++ X509_REQ_get_attr_by_NID; ++ X509_REQ_get_attr; ++ X509_REQ_add1_attr_by_NID; ++ X509_REQ_get_attr_by_OBJ; ++ X509at_add1_attr_by_NID; ++ X509_REQ_add1_attr_by_OBJ; ++ X509_REQ_get_attr_count; ++ X509_REQ_add1_attr; ++ X509_REQ_delete_attr; ++ X509at_add1_attr_by_OBJ; ++ X509_REQ_add1_attr_by_txt; ++ X509_ATTRIBUTE_create_by_txt; ++ X509at_add1_attr_by_txt; ++ BN_pseudo_rand; ++ BN_is_prime_fasttest; ++ BN_CTX_end; ++ BN_CTX_start; ++ BN_CTX_get; ++ EVP_PKEY2PKCS8_broken; ++ ASN1_STRING_TABLE_add; ++ CRYPTO_dbg_get_options; ++ AUTHORITY_INFO_ACCESS_new; ++ CRYPTO_get_mem_debug_options; ++ DES_crypt; ++ PEM_write_bio_X509_REQ_NEW; ++ PEM_write_X509_REQ_NEW; ++ BIO_callback_ctrl; ++ RAND_egd; ++ RAND_status; ++ bn_dump1; ++ DES_check_key_parity; ++ lh_num_items; ++ RAND_event; ++ DSO_new; ++ DSO_new_method; ++ DSO_free; ++ DSO_flags; ++ DSO_up; ++ DSO_set_default_method; ++ DSO_get_default_method; ++ DSO_get_method; ++ DSO_set_method; ++ DSO_load; ++ DSO_bind_var; ++ DSO_METHOD_null; ++ DSO_METHOD_openssl; ++ DSO_METHOD_dlfcn; ++ DSO_METHOD_win32; ++ ERR_load_DSO_strings; ++ DSO_METHOD_dl; ++ NCONF_load; ++ NCONF_load_fp; ++ NCONF_new; ++ NCONF_get_string; ++ NCONF_free; ++ NCONF_get_number; ++ CONF_dump_fp; ++ NCONF_load_bio; ++ NCONF_dump_fp; ++ NCONF_get_section; ++ NCONF_dump_bio; ++ CONF_dump_bio; ++ NCONF_free_data; ++ CONF_set_default_method; ++ ERR_error_string_n; ++ BIO_snprintf; ++ DSO_ctrl; ++ i2d_ASN1_SET_OF_ASN1_INTEGER; ++ i2d_ASN1_SET_OF_PKCS12_SAFEBAG; ++ i2d_ASN1_SET_OF_PKCS7; ++ BIO_vfree; ++ d2i_ASN1_SET_OF_ASN1_INTEGER; ++ d2i_ASN1_SET_OF_PKCS12_SAFEBAG; ++ ASN1_UTCTIME_get; ++ X509_REQ_digest; ++ X509_CRL_digest; ++ d2i_ASN1_SET_OF_PKCS7; ++ EVP_CIPHER_CTX_set_key_length; ++ EVP_CIPHER_CTX_ctrl; ++ BN_mod_exp_mont_word; ++ RAND_egd_bytes; ++ X509_REQ_get1_email; ++ X509_get1_email; ++ X509_email_free; ++ i2d_RSA_NET; ++ d2i_RSA_NET_2; ++ d2i_RSA_NET; ++ DSO_bind_func; ++ CRYPTO_get_new_dynlockid; ++ sk_new_null; ++ CRYPTO_set_dynlock_destroy_callback; ++ CRYPTO_set_dynlock_destroy_cb; ++ CRYPTO_destroy_dynlockid; ++ CRYPTO_set_dynlock_size; ++ CRYPTO_set_dynlock_create_callback; ++ CRYPTO_set_dynlock_create_cb; ++ CRYPTO_set_dynlock_lock_callback; ++ CRYPTO_set_dynlock_lock_cb; ++ CRYPTO_get_dynlock_lock_callback; ++ CRYPTO_get_dynlock_lock_cb; ++ CRYPTO_get_dynlock_destroy_callback; ++ CRYPTO_get_dynlock_destroy_cb; ++ CRYPTO_get_dynlock_value; ++ CRYPTO_get_dynlock_create_callback; ++ CRYPTO_get_dynlock_create_cb; ++ c2i_ASN1_BIT_STRING; ++ i2c_ASN1_BIT_STRING; ++ RAND_poll; ++ c2i_ASN1_INTEGER; ++ i2c_ASN1_INTEGER; ++ BIO_dump_indent; ++ ASN1_parse_dump; ++ c2i_ASN1_OBJECT; ++ X509_NAME_print_ex_fp; ++ ASN1_STRING_print_ex_fp; ++ X509_NAME_print_ex; ++ ASN1_STRING_print_ex; ++ MD4; ++ MD4_Transform; ++ MD4_Final; ++ MD4_Update; ++ MD4_Init; ++ EVP_md4; ++ i2d_PUBKEY_bio; ++ i2d_PUBKEY_fp; ++ d2i_PUBKEY_bio; ++ ASN1_STRING_to_UTF8; ++ BIO_vprintf; ++ BIO_vsnprintf; ++ d2i_PUBKEY_fp; ++ X509_cmp_time; ++ X509_STORE_CTX_set_time; ++ X509_STORE_CTX_get1_issuer; ++ X509_OBJECT_retrieve_match; ++ X509_OBJECT_idx_by_subject; ++ X509_STORE_CTX_set_flags; ++ X509_STORE_CTX_trusted_stack; ++ X509_time_adj; ++ X509_check_issued; ++ ASN1_UTCTIME_cmp_time_t; ++ DES_set_weak_key_flag; ++ DES_check_key; ++ DES_rw_mode; ++ RSA_PKCS1_RSAref; ++ X509_keyid_set1; ++ BIO_next; ++ DSO_METHOD_vms; ++ BIO_f_linebuffer; ++ BN_bntest_rand; ++ OPENSSL_issetugid; ++ BN_rand_range; ++ ERR_load_ENGINE_strings; ++ ENGINE_set_DSA; ++ ENGINE_get_finish_function; ++ ENGINE_get_default_RSA; ++ ENGINE_get_BN_mod_exp; ++ DSA_get_default_openssl_method; ++ ENGINE_set_DH; ++ ENGINE_set_def_BN_mod_exp_crt; ++ ENGINE_set_default_BN_mod_exp_crt; ++ ENGINE_init; ++ DH_get_default_openssl_method; ++ RSA_set_default_openssl_method; ++ ENGINE_finish; ++ ENGINE_load_public_key; ++ ENGINE_get_DH; ++ ENGINE_ctrl; ++ ENGINE_get_init_function; ++ ENGINE_set_init_function; ++ ENGINE_set_default_DSA; ++ ENGINE_get_name; ++ ENGINE_get_last; ++ ENGINE_get_prev; ++ ENGINE_get_default_DH; ++ ENGINE_get_RSA; ++ ENGINE_set_default; ++ ENGINE_get_RAND; ++ ENGINE_get_first; ++ ENGINE_by_id; ++ ENGINE_set_finish_function; ++ ENGINE_get_def_BN_mod_exp_crt; ++ ENGINE_get_default_BN_mod_exp_crt; ++ RSA_get_default_openssl_method; ++ ENGINE_set_RSA; ++ ENGINE_load_private_key; ++ ENGINE_set_default_RAND; ++ ENGINE_set_BN_mod_exp; ++ ENGINE_remove; ++ ENGINE_free; ++ ENGINE_get_BN_mod_exp_crt; ++ ENGINE_get_next; ++ ENGINE_set_name; ++ ENGINE_get_default_DSA; ++ ENGINE_set_default_BN_mod_exp; ++ ENGINE_set_default_RSA; ++ ENGINE_get_default_RAND; ++ ENGINE_get_default_BN_mod_exp; ++ ENGINE_set_RAND; ++ ENGINE_set_id; ++ ENGINE_set_BN_mod_exp_crt; ++ ENGINE_set_default_DH; ++ ENGINE_new; ++ ENGINE_get_id; ++ DSA_set_default_openssl_method; ++ ENGINE_add; ++ DH_set_default_openssl_method; ++ ENGINE_get_DSA; ++ ENGINE_get_ctrl_function; ++ ENGINE_set_ctrl_function; ++ BN_pseudo_rand_range; ++ X509_STORE_CTX_set_verify_cb; ++ ERR_load_COMP_strings; ++ PKCS12_item_decrypt_d2i; ++ ASN1_UTF8STRING_it; ++ ASN1_UTF8STRING_it; ++ ENGINE_unregister_ciphers; ++ ENGINE_get_ciphers; ++ d2i_OCSP_BASICRESP; ++ KRB5_CHECKSUM_it; ++ KRB5_CHECKSUM_it; ++ EC_POINT_add; ++ ASN1_item_ex_i2d; ++ OCSP_CERTID_it; ++ OCSP_CERTID_it; ++ d2i_OCSP_RESPBYTES; ++ X509V3_add1_i2d; ++ PKCS7_ENVELOPE_it; ++ PKCS7_ENVELOPE_it; ++ UI_add_input_boolean; ++ ENGINE_unregister_RSA; ++ X509V3_EXT_nconf; ++ ASN1_GENERALSTRING_free; ++ d2i_OCSP_CERTSTATUS; ++ X509_REVOKED_set_serialNumber; ++ X509_print_ex; ++ OCSP_ONEREQ_get1_ext_d2i; ++ ENGINE_register_all_RAND; ++ ENGINE_load_dynamic; ++ PBKDF2PARAM_it; ++ PBKDF2PARAM_it; ++ EXTENDED_KEY_USAGE_new; ++ EC_GROUP_clear_free; ++ OCSP_sendreq_bio; ++ ASN1_item_digest; ++ OCSP_BASICRESP_delete_ext; ++ OCSP_SIGNATURE_it; ++ OCSP_SIGNATURE_it; ++ X509_CRL_it; ++ X509_CRL_it; ++ OCSP_BASICRESP_add_ext; ++ KRB5_ENCKEY_it; ++ KRB5_ENCKEY_it; ++ UI_method_set_closer; ++ X509_STORE_set_purpose; ++ i2d_ASN1_GENERALSTRING; ++ OCSP_response_status; ++ i2d_OCSP_SERVICELOC; ++ ENGINE_get_digest_engine; ++ EC_GROUP_set_curve_GFp; ++ OCSP_REQUEST_get_ext_by_OBJ; ++ _ossl_old_des_random_key; ++ ASN1_T61STRING_it; ++ ASN1_T61STRING_it; ++ EC_GROUP_method_of; ++ i2d_KRB5_APREQ; ++ _ossl_old_des_encrypt; ++ ASN1_PRINTABLE_new; ++ HMAC_Init_ex; ++ d2i_KRB5_AUTHENT; ++ OCSP_archive_cutoff_new; ++ EC_POINT_set_Jprojective_coordinates_GFp; ++ EC_POINT_set_Jproj_coords_GFp; ++ _ossl_old_des_is_weak_key; ++ OCSP_BASICRESP_get_ext_by_OBJ; ++ EC_POINT_oct2point; ++ OCSP_SINGLERESP_get_ext_count; ++ UI_ctrl; ++ _shadow_DES_rw_mode; ++ _shadow_DES_rw_mode; ++ asn1_do_adb; ++ ASN1_template_i2d; ++ ENGINE_register_DH; ++ UI_construct_prompt; ++ X509_STORE_set_trust; ++ UI_dup_input_string; ++ d2i_KRB5_APREQ; ++ EVP_MD_CTX_copy_ex; ++ OCSP_request_is_signed; ++ i2d_OCSP_REQINFO; ++ KRB5_ENCKEY_free; ++ OCSP_resp_get0; ++ GENERAL_NAME_it; ++ GENERAL_NAME_it; ++ ASN1_GENERALIZEDTIME_it; ++ ASN1_GENERALIZEDTIME_it; ++ X509_STORE_set_flags; ++ EC_POINT_set_compressed_coordinates_GFp; ++ EC_POINT_set_compr_coords_GFp; ++ OCSP_response_status_str; ++ d2i_OCSP_REVOKEDINFO; ++ OCSP_basic_add1_cert; ++ ERR_get_implementation; ++ EVP_CipherFinal_ex; ++ OCSP_CERTSTATUS_new; ++ CRYPTO_cleanup_all_ex_data; ++ OCSP_resp_find; ++ BN_nnmod; ++ X509_CRL_sort; ++ X509_REVOKED_set_revocationDate; ++ ENGINE_register_RAND; ++ OCSP_SERVICELOC_new; ++ EC_POINT_set_affine_coordinates_GFp; ++ EC_POINT_set_affine_coords_GFp; ++ _ossl_old_des_options; ++ SXNET_it; ++ SXNET_it; ++ UI_dup_input_boolean; ++ PKCS12_add_CSPName_asc; ++ EC_POINT_is_at_infinity; ++ ENGINE_load_cryptodev; ++ DSO_convert_filename; ++ POLICYQUALINFO_it; ++ POLICYQUALINFO_it; ++ ENGINE_register_ciphers; ++ BN_mod_lshift_quick; ++ DSO_set_filename; ++ ASN1_item_free; ++ KRB5_TKTBODY_free; ++ AUTHORITY_KEYID_it; ++ AUTHORITY_KEYID_it; ++ KRB5_APREQBODY_new; ++ X509V3_EXT_REQ_add_nconf; ++ ENGINE_ctrl_cmd_string; ++ i2d_OCSP_RESPDATA; ++ EVP_MD_CTX_init; ++ EXTENDED_KEY_USAGE_free; ++ PKCS7_ATTR_SIGN_it; ++ PKCS7_ATTR_SIGN_it; ++ UI_add_error_string; ++ KRB5_CHECKSUM_free; ++ OCSP_REQUEST_get_ext; ++ ENGINE_load_ubsec; ++ ENGINE_register_all_digests; ++ PKEY_USAGE_PERIOD_it; ++ PKEY_USAGE_PERIOD_it; ++ PKCS12_unpack_authsafes; ++ ASN1_item_unpack; ++ NETSCAPE_SPKAC_it; ++ NETSCAPE_SPKAC_it; ++ X509_REVOKED_it; ++ X509_REVOKED_it; ++ ASN1_STRING_encode; ++ EVP_aes_128_ecb; ++ KRB5_AUTHENT_free; ++ OCSP_BASICRESP_get_ext_by_critical; ++ OCSP_BASICRESP_get_ext_by_crit; ++ OCSP_cert_status_str; ++ d2i_OCSP_REQUEST; ++ UI_dup_info_string; ++ _ossl_old_des_xwhite_in2out; ++ PKCS12_it; ++ PKCS12_it; ++ OCSP_SINGLERESP_get_ext_by_critical; ++ OCSP_SINGLERESP_get_ext_by_crit; ++ OCSP_CERTSTATUS_free; ++ _ossl_old_des_crypt; ++ ASN1_item_i2d; ++ EVP_DecryptFinal_ex; ++ ENGINE_load_openssl; ++ ENGINE_get_cmd_defns; ++ ENGINE_set_load_privkey_function; ++ ENGINE_set_load_privkey_fn; ++ EVP_EncryptFinal_ex; ++ ENGINE_set_default_digests; ++ X509_get0_pubkey_bitstr; ++ asn1_ex_i2c; ++ ENGINE_register_RSA; ++ ENGINE_unregister_DSA; ++ _ossl_old_des_key_sched; ++ X509_EXTENSION_it; ++ X509_EXTENSION_it; ++ i2d_KRB5_AUTHENT; ++ SXNETID_it; ++ SXNETID_it; ++ d2i_OCSP_SINGLERESP; ++ EDIPARTYNAME_new; ++ PKCS12_certbag2x509; ++ _ossl_old_des_ofb64_encrypt; ++ d2i_EXTENDED_KEY_USAGE; ++ ERR_print_errors_cb; ++ ENGINE_set_ciphers; ++ d2i_KRB5_APREQBODY; ++ UI_method_get_flusher; ++ X509_PUBKEY_it; ++ X509_PUBKEY_it; ++ _ossl_old_des_enc_read; ++ PKCS7_ENCRYPT_it; ++ PKCS7_ENCRYPT_it; ++ i2d_OCSP_RESPONSE; ++ EC_GROUP_get_cofactor; ++ PKCS12_unpack_p7data; ++ d2i_KRB5_AUTHDATA; ++ OCSP_copy_nonce; ++ KRB5_AUTHDATA_new; ++ OCSP_RESPDATA_new; ++ EC_GFp_mont_method; ++ OCSP_REVOKEDINFO_free; ++ UI_get_ex_data; ++ KRB5_APREQBODY_free; ++ EC_GROUP_get0_generator; ++ UI_get_default_method; ++ X509V3_set_nconf; ++ PKCS12_item_i2d_encrypt; ++ X509_add1_ext_i2d; ++ PKCS7_SIGNER_INFO_it; ++ PKCS7_SIGNER_INFO_it; ++ KRB5_PRINCNAME_new; ++ PKCS12_SAFEBAG_it; ++ PKCS12_SAFEBAG_it; ++ EC_GROUP_get_order; ++ d2i_OCSP_RESPID; ++ OCSP_request_verify; ++ NCONF_get_number_e; ++ _ossl_old_des_decrypt3; ++ X509_signature_print; ++ OCSP_SINGLERESP_free; ++ ENGINE_load_builtin_engines; ++ i2d_OCSP_ONEREQ; ++ OCSP_REQUEST_add_ext; ++ OCSP_RESPBYTES_new; ++ EVP_MD_CTX_create; ++ OCSP_resp_find_status; ++ X509_ALGOR_it; ++ X509_ALGOR_it; ++ ASN1_TIME_it; ++ ASN1_TIME_it; ++ OCSP_request_set1_name; ++ OCSP_ONEREQ_get_ext_count; ++ UI_get0_result; ++ PKCS12_AUTHSAFES_it; ++ PKCS12_AUTHSAFES_it; ++ EVP_aes_256_ecb; ++ PKCS12_pack_authsafes; ++ ASN1_IA5STRING_it; ++ ASN1_IA5STRING_it; ++ UI_get_input_flags; ++ EC_GROUP_set_generator; ++ _ossl_old_des_string_to_2keys; ++ OCSP_CERTID_free; ++ X509_CERT_AUX_it; ++ X509_CERT_AUX_it; ++ CERTIFICATEPOLICIES_it; ++ CERTIFICATEPOLICIES_it; ++ _ossl_old_des_ede3_cbc_encrypt; ++ RAND_set_rand_engine; ++ DSO_get_loaded_filename; ++ X509_ATTRIBUTE_it; ++ X509_ATTRIBUTE_it; ++ OCSP_ONEREQ_get_ext_by_NID; ++ PKCS12_decrypt_skey; ++ KRB5_AUTHENT_it; ++ KRB5_AUTHENT_it; ++ UI_dup_error_string; ++ RSAPublicKey_it; ++ RSAPublicKey_it; ++ i2d_OCSP_REQUEST; ++ PKCS12_x509crl2certbag; ++ OCSP_SERVICELOC_it; ++ OCSP_SERVICELOC_it; ++ ASN1_item_sign; ++ X509_CRL_set_issuer_name; ++ OBJ_NAME_do_all_sorted; ++ i2d_OCSP_BASICRESP; ++ i2d_OCSP_RESPBYTES; ++ PKCS12_unpack_p7encdata; ++ HMAC_CTX_init; ++ ENGINE_get_digest; ++ OCSP_RESPONSE_print; ++ KRB5_TKTBODY_it; ++ KRB5_TKTBODY_it; ++ ACCESS_DESCRIPTION_it; ++ ACCESS_DESCRIPTION_it; ++ PKCS7_ISSUER_AND_SERIAL_it; ++ PKCS7_ISSUER_AND_SERIAL_it; ++ PBE2PARAM_it; ++ PBE2PARAM_it; ++ PKCS12_certbag2x509crl; ++ PKCS7_SIGNED_it; ++ PKCS7_SIGNED_it; ++ ENGINE_get_cipher; ++ i2d_OCSP_CRLID; ++ OCSP_SINGLERESP_new; ++ ENGINE_cmd_is_executable; ++ RSA_up_ref; ++ ASN1_GENERALSTRING_it; ++ ASN1_GENERALSTRING_it; ++ ENGINE_register_DSA; ++ X509V3_EXT_add_nconf_sk; ++ ENGINE_set_load_pubkey_function; ++ PKCS8_decrypt; ++ PEM_bytes_read_bio; ++ DIRECTORYSTRING_it; ++ DIRECTORYSTRING_it; ++ d2i_OCSP_CRLID; ++ EC_POINT_is_on_curve; ++ CRYPTO_set_locked_mem_ex_functions; ++ CRYPTO_set_locked_mem_ex_funcs; ++ d2i_KRB5_CHECKSUM; ++ ASN1_item_dup; ++ X509_it; ++ X509_it; ++ BN_mod_add; ++ KRB5_AUTHDATA_free; ++ _ossl_old_des_cbc_cksum; ++ ASN1_item_verify; ++ CRYPTO_set_mem_ex_functions; ++ EC_POINT_get_Jprojective_coordinates_GFp; ++ EC_POINT_get_Jproj_coords_GFp; ++ ZLONG_it; ++ ZLONG_it; ++ CRYPTO_get_locked_mem_ex_functions; ++ CRYPTO_get_locked_mem_ex_funcs; ++ ASN1_TIME_check; ++ UI_get0_user_data; ++ HMAC_CTX_cleanup; ++ DSA_up_ref; ++ _ossl_old_des_ede3_cfb64_encrypt; ++ _ossl_odes_ede3_cfb64_encrypt; ++ ASN1_BMPSTRING_it; ++ ASN1_BMPSTRING_it; ++ ASN1_tag2bit; ++ UI_method_set_flusher; ++ X509_ocspid_print; ++ KRB5_ENCDATA_it; ++ KRB5_ENCDATA_it; ++ ENGINE_get_load_pubkey_function; ++ UI_add_user_data; ++ OCSP_REQUEST_delete_ext; ++ UI_get_method; ++ OCSP_ONEREQ_free; ++ ASN1_PRINTABLESTRING_it; ++ ASN1_PRINTABLESTRING_it; ++ X509_CRL_set_nextUpdate; ++ OCSP_REQUEST_it; ++ OCSP_REQUEST_it; ++ OCSP_BASICRESP_it; ++ OCSP_BASICRESP_it; ++ AES_ecb_encrypt; ++ BN_mod_sqr; ++ NETSCAPE_CERT_SEQUENCE_it; ++ NETSCAPE_CERT_SEQUENCE_it; ++ GENERAL_NAMES_it; ++ GENERAL_NAMES_it; ++ AUTHORITY_INFO_ACCESS_it; ++ AUTHORITY_INFO_ACCESS_it; ++ ASN1_FBOOLEAN_it; ++ ASN1_FBOOLEAN_it; ++ UI_set_ex_data; ++ _ossl_old_des_string_to_key; ++ ENGINE_register_all_RSA; ++ d2i_KRB5_PRINCNAME; ++ OCSP_RESPBYTES_it; ++ OCSP_RESPBYTES_it; ++ X509_CINF_it; ++ X509_CINF_it; ++ ENGINE_unregister_digests; ++ d2i_EDIPARTYNAME; ++ d2i_OCSP_SERVICELOC; ++ ENGINE_get_digests; ++ _ossl_old_des_set_odd_parity; ++ OCSP_RESPDATA_free; ++ d2i_KRB5_TICKET; ++ OTHERNAME_it; ++ OTHERNAME_it; ++ EVP_MD_CTX_cleanup; ++ d2i_ASN1_GENERALSTRING; ++ X509_CRL_set_version; ++ BN_mod_sub; ++ OCSP_SINGLERESP_get_ext_by_NID; ++ ENGINE_get_ex_new_index; ++ OCSP_REQUEST_free; ++ OCSP_REQUEST_add1_ext_i2d; ++ X509_VAL_it; ++ X509_VAL_it; ++ EC_POINTs_make_affine; ++ EC_POINT_mul; ++ X509V3_EXT_add_nconf; ++ X509_TRUST_set; ++ X509_CRL_add1_ext_i2d; ++ _ossl_old_des_fcrypt; ++ DISPLAYTEXT_it; ++ DISPLAYTEXT_it; ++ X509_CRL_set_lastUpdate; ++ OCSP_BASICRESP_free; ++ OCSP_BASICRESP_add1_ext_i2d; ++ d2i_KRB5_AUTHENTBODY; ++ CRYPTO_set_ex_data_implementation; ++ CRYPTO_set_ex_data_impl; ++ KRB5_ENCDATA_new; ++ DSO_up_ref; ++ OCSP_crl_reason_str; ++ UI_get0_result_string; ++ ASN1_GENERALSTRING_new; ++ X509_SIG_it; ++ X509_SIG_it; ++ ERR_set_implementation; ++ ERR_load_EC_strings; ++ UI_get0_action_string; ++ OCSP_ONEREQ_get_ext; ++ EC_POINT_method_of; ++ i2d_KRB5_APREQBODY; ++ _ossl_old_des_ecb3_encrypt; ++ CRYPTO_get_mem_ex_functions; ++ ENGINE_get_ex_data; ++ UI_destroy_method; ++ ASN1_item_i2d_bio; ++ OCSP_ONEREQ_get_ext_by_OBJ; ++ ASN1_primitive_new; ++ ASN1_PRINTABLE_it; ++ ASN1_PRINTABLE_it; ++ EVP_aes_192_ecb; ++ OCSP_SIGNATURE_new; ++ LONG_it; ++ LONG_it; ++ ASN1_VISIBLESTRING_it; ++ ASN1_VISIBLESTRING_it; ++ OCSP_SINGLERESP_add1_ext_i2d; ++ d2i_OCSP_CERTID; ++ ASN1_item_d2i_fp; ++ CRL_DIST_POINTS_it; ++ CRL_DIST_POINTS_it; ++ GENERAL_NAME_print; ++ OCSP_SINGLERESP_delete_ext; ++ PKCS12_SAFEBAGS_it; ++ PKCS12_SAFEBAGS_it; ++ d2i_OCSP_SIGNATURE; ++ OCSP_request_add1_nonce; ++ ENGINE_set_cmd_defns; ++ OCSP_SERVICELOC_free; ++ EC_GROUP_free; ++ ASN1_BIT_STRING_it; ++ ASN1_BIT_STRING_it; ++ X509_REQ_it; ++ X509_REQ_it; ++ _ossl_old_des_cbc_encrypt; ++ ERR_unload_strings; ++ PKCS7_SIGN_ENVELOPE_it; ++ PKCS7_SIGN_ENVELOPE_it; ++ EDIPARTYNAME_free; ++ OCSP_REQINFO_free; ++ EC_GROUP_new_curve_GFp; ++ OCSP_REQUEST_get1_ext_d2i; ++ PKCS12_item_pack_safebag; ++ asn1_ex_c2i; ++ ENGINE_register_digests; ++ i2d_OCSP_REVOKEDINFO; ++ asn1_enc_restore; ++ UI_free; ++ UI_new_method; ++ EVP_EncryptInit_ex; ++ X509_pubkey_digest; ++ EC_POINT_invert; ++ OCSP_basic_sign; ++ i2d_OCSP_RESPID; ++ OCSP_check_nonce; ++ ENGINE_ctrl_cmd; ++ d2i_KRB5_ENCKEY; ++ OCSP_parse_url; ++ OCSP_SINGLERESP_get_ext; ++ OCSP_CRLID_free; ++ OCSP_BASICRESP_get1_ext_d2i; ++ RSAPrivateKey_it; ++ RSAPrivateKey_it; ++ ENGINE_register_all_DH; ++ i2d_EDIPARTYNAME; ++ EC_POINT_get_affine_coordinates_GFp; ++ EC_POINT_get_affine_coords_GFp; ++ OCSP_CRLID_new; ++ ENGINE_get_flags; ++ OCSP_ONEREQ_it; ++ OCSP_ONEREQ_it; ++ UI_process; ++ ASN1_INTEGER_it; ++ ASN1_INTEGER_it; ++ EVP_CipherInit_ex; ++ UI_get_string_type; ++ ENGINE_unregister_DH; ++ ENGINE_register_all_DSA; ++ OCSP_ONEREQ_get_ext_by_critical; ++ bn_dup_expand; ++ OCSP_cert_id_new; ++ BASIC_CONSTRAINTS_it; ++ BASIC_CONSTRAINTS_it; ++ BN_mod_add_quick; ++ EC_POINT_new; ++ EVP_MD_CTX_destroy; ++ OCSP_RESPBYTES_free; ++ EVP_aes_128_cbc; ++ OCSP_SINGLERESP_get1_ext_d2i; ++ EC_POINT_free; ++ DH_up_ref; ++ X509_NAME_ENTRY_it; ++ X509_NAME_ENTRY_it; ++ UI_get_ex_new_index; ++ BN_mod_sub_quick; ++ OCSP_ONEREQ_add_ext; ++ OCSP_request_sign; ++ EVP_DigestFinal_ex; ++ ENGINE_set_digests; ++ OCSP_id_issuer_cmp; ++ OBJ_NAME_do_all; ++ EC_POINTs_mul; ++ ENGINE_register_complete; ++ X509V3_EXT_nconf_nid; ++ ASN1_SEQUENCE_it; ++ ASN1_SEQUENCE_it; ++ UI_set_default_method; ++ RAND_query_egd_bytes; ++ UI_method_get_writer; ++ UI_OpenSSL; ++ PEM_def_callback; ++ ENGINE_cleanup; ++ DIST_POINT_it; ++ DIST_POINT_it; ++ OCSP_SINGLERESP_it; ++ OCSP_SINGLERESP_it; ++ d2i_KRB5_TKTBODY; ++ EC_POINT_cmp; ++ OCSP_REVOKEDINFO_new; ++ i2d_OCSP_CERTSTATUS; ++ OCSP_basic_add1_nonce; ++ ASN1_item_ex_d2i; ++ BN_mod_lshift1_quick; ++ UI_set_method; ++ OCSP_id_get0_info; ++ BN_mod_sqrt; ++ EC_GROUP_copy; ++ KRB5_ENCDATA_free; ++ _ossl_old_des_cfb_encrypt; ++ OCSP_SINGLERESP_get_ext_by_OBJ; ++ OCSP_cert_to_id; ++ OCSP_RESPID_new; ++ OCSP_RESPDATA_it; ++ OCSP_RESPDATA_it; ++ d2i_OCSP_RESPDATA; ++ ENGINE_register_all_complete; ++ OCSP_check_validity; ++ PKCS12_BAGS_it; ++ PKCS12_BAGS_it; ++ OCSP_url_svcloc_new; ++ ASN1_template_free; ++ OCSP_SINGLERESP_add_ext; ++ KRB5_AUTHENTBODY_it; ++ KRB5_AUTHENTBODY_it; ++ X509_supported_extension; ++ i2d_KRB5_AUTHDATA; ++ UI_method_get_opener; ++ ENGINE_set_ex_data; ++ OCSP_REQUEST_print; ++ CBIGNUM_it; ++ CBIGNUM_it; ++ KRB5_TICKET_new; ++ KRB5_APREQ_new; ++ EC_GROUP_get_curve_GFp; ++ KRB5_ENCKEY_new; ++ ASN1_template_d2i; ++ _ossl_old_des_quad_cksum; ++ OCSP_single_get0_status; ++ BN_swap; ++ POLICYINFO_it; ++ POLICYINFO_it; ++ ENGINE_set_destroy_function; ++ asn1_enc_free; ++ OCSP_RESPID_it; ++ OCSP_RESPID_it; ++ EC_GROUP_new; ++ EVP_aes_256_cbc; ++ i2d_KRB5_PRINCNAME; ++ _ossl_old_des_encrypt2; ++ _ossl_old_des_encrypt3; ++ PKCS8_PRIV_KEY_INFO_it; ++ PKCS8_PRIV_KEY_INFO_it; ++ OCSP_REQINFO_it; ++ OCSP_REQINFO_it; ++ PBEPARAM_it; ++ PBEPARAM_it; ++ KRB5_AUTHENTBODY_new; ++ X509_CRL_add0_revoked; ++ EDIPARTYNAME_it; ++ EDIPARTYNAME_it; ++ NETSCAPE_SPKI_it; ++ NETSCAPE_SPKI_it; ++ UI_get0_test_string; ++ ENGINE_get_cipher_engine; ++ ENGINE_register_all_ciphers; ++ EC_POINT_copy; ++ BN_kronecker; ++ _ossl_old_des_ede3_ofb64_encrypt; ++ _ossl_odes_ede3_ofb64_encrypt; ++ UI_method_get_reader; ++ OCSP_BASICRESP_get_ext_count; ++ ASN1_ENUMERATED_it; ++ ASN1_ENUMERATED_it; ++ UI_set_result; ++ i2d_KRB5_TICKET; ++ X509_print_ex_fp; ++ EVP_CIPHER_CTX_set_padding; ++ d2i_OCSP_RESPONSE; ++ ASN1_UTCTIME_it; ++ ASN1_UTCTIME_it; ++ _ossl_old_des_enc_write; ++ OCSP_RESPONSE_new; ++ AES_set_encrypt_key; ++ OCSP_resp_count; ++ KRB5_CHECKSUM_new; ++ ENGINE_load_cswift; ++ OCSP_onereq_get0_id; ++ ENGINE_set_default_ciphers; ++ NOTICEREF_it; ++ NOTICEREF_it; ++ X509V3_EXT_CRL_add_nconf; ++ OCSP_REVOKEDINFO_it; ++ OCSP_REVOKEDINFO_it; ++ AES_encrypt; ++ OCSP_REQUEST_new; ++ ASN1_ANY_it; ++ ASN1_ANY_it; ++ CRYPTO_ex_data_new_class; ++ _ossl_old_des_ncbc_encrypt; ++ i2d_KRB5_TKTBODY; ++ EC_POINT_clear_free; ++ AES_decrypt; ++ asn1_enc_init; ++ UI_get_result_maxsize; ++ OCSP_CERTID_new; ++ ENGINE_unregister_RAND; ++ UI_method_get_closer; ++ d2i_KRB5_ENCDATA; ++ OCSP_request_onereq_count; ++ OCSP_basic_verify; ++ KRB5_AUTHENTBODY_free; ++ ASN1_item_d2i; ++ ASN1_primitive_free; ++ i2d_EXTENDED_KEY_USAGE; ++ i2d_OCSP_SIGNATURE; ++ asn1_enc_save; ++ ENGINE_load_nuron; ++ _ossl_old_des_pcbc_encrypt; ++ PKCS12_MAC_DATA_it; ++ PKCS12_MAC_DATA_it; ++ OCSP_accept_responses_new; ++ asn1_do_lock; ++ PKCS7_ATTR_VERIFY_it; ++ PKCS7_ATTR_VERIFY_it; ++ KRB5_APREQBODY_it; ++ KRB5_APREQBODY_it; ++ i2d_OCSP_SINGLERESP; ++ ASN1_item_ex_new; ++ UI_add_verify_string; ++ _ossl_old_des_set_key; ++ KRB5_PRINCNAME_it; ++ KRB5_PRINCNAME_it; ++ EVP_DecryptInit_ex; ++ i2d_OCSP_CERTID; ++ ASN1_item_d2i_bio; ++ EC_POINT_dbl; ++ asn1_get_choice_selector; ++ i2d_KRB5_CHECKSUM; ++ ENGINE_set_table_flags; ++ AES_options; ++ ENGINE_load_chil; ++ OCSP_id_cmp; ++ OCSP_BASICRESP_new; ++ OCSP_REQUEST_get_ext_by_NID; ++ KRB5_APREQ_it; ++ KRB5_APREQ_it; ++ ENGINE_get_destroy_function; ++ CONF_set_nconf; ++ ASN1_PRINTABLE_free; ++ OCSP_BASICRESP_get_ext_by_NID; ++ DIST_POINT_NAME_it; ++ DIST_POINT_NAME_it; ++ X509V3_extensions_print; ++ _ossl_old_des_cfb64_encrypt; ++ X509_REVOKED_add1_ext_i2d; ++ _ossl_old_des_ofb_encrypt; ++ KRB5_TKTBODY_new; ++ ASN1_OCTET_STRING_it; ++ ASN1_OCTET_STRING_it; ++ ERR_load_UI_strings; ++ i2d_KRB5_ENCKEY; ++ ASN1_template_new; ++ OCSP_SIGNATURE_free; ++ ASN1_item_i2d_fp; ++ KRB5_PRINCNAME_free; ++ PKCS7_RECIP_INFO_it; ++ PKCS7_RECIP_INFO_it; ++ EXTENDED_KEY_USAGE_it; ++ EXTENDED_KEY_USAGE_it; ++ EC_GFp_simple_method; ++ EC_GROUP_precompute_mult; ++ OCSP_request_onereq_get0; ++ UI_method_set_writer; ++ KRB5_AUTHENT_new; ++ X509_CRL_INFO_it; ++ X509_CRL_INFO_it; ++ DSO_set_name_converter; ++ AES_set_decrypt_key; ++ PKCS7_DIGEST_it; ++ PKCS7_DIGEST_it; ++ PKCS12_x5092certbag; ++ EVP_DigestInit_ex; ++ i2a_ACCESS_DESCRIPTION; ++ OCSP_RESPONSE_it; ++ OCSP_RESPONSE_it; ++ PKCS7_ENC_CONTENT_it; ++ PKCS7_ENC_CONTENT_it; ++ OCSP_request_add0_id; ++ EC_POINT_make_affine; ++ DSO_get_filename; ++ OCSP_CERTSTATUS_it; ++ OCSP_CERTSTATUS_it; ++ OCSP_request_add1_cert; ++ UI_get0_output_string; ++ UI_dup_verify_string; ++ BN_mod_lshift; ++ KRB5_AUTHDATA_it; ++ KRB5_AUTHDATA_it; ++ asn1_set_choice_selector; ++ OCSP_basic_add1_status; ++ OCSP_RESPID_free; ++ asn1_get_field_ptr; ++ UI_add_input_string; ++ OCSP_CRLID_it; ++ OCSP_CRLID_it; ++ i2d_KRB5_AUTHENTBODY; ++ OCSP_REQUEST_get_ext_count; ++ ENGINE_load_atalla; ++ X509_NAME_it; ++ X509_NAME_it; ++ USERNOTICE_it; ++ USERNOTICE_it; ++ OCSP_REQINFO_new; ++ OCSP_BASICRESP_get_ext; ++ CRYPTO_get_ex_data_implementation; ++ CRYPTO_get_ex_data_impl; ++ ASN1_item_pack; ++ i2d_KRB5_ENCDATA; ++ X509_PURPOSE_set; ++ X509_REQ_INFO_it; ++ X509_REQ_INFO_it; ++ UI_method_set_opener; ++ ASN1_item_ex_free; ++ ASN1_BOOLEAN_it; ++ ASN1_BOOLEAN_it; ++ ENGINE_get_table_flags; ++ UI_create_method; ++ OCSP_ONEREQ_add1_ext_i2d; ++ _shadow_DES_check_key; ++ _shadow_DES_check_key; ++ d2i_OCSP_REQINFO; ++ UI_add_info_string; ++ UI_get_result_minsize; ++ ASN1_NULL_it; ++ ASN1_NULL_it; ++ BN_mod_lshift1; ++ d2i_OCSP_ONEREQ; ++ OCSP_ONEREQ_new; ++ KRB5_TICKET_it; ++ KRB5_TICKET_it; ++ EVP_aes_192_cbc; ++ KRB5_TICKET_free; ++ UI_new; ++ OCSP_response_create; ++ _ossl_old_des_xcbc_encrypt; ++ PKCS7_it; ++ PKCS7_it; ++ OCSP_REQUEST_get_ext_by_critical; ++ OCSP_REQUEST_get_ext_by_crit; ++ ENGINE_set_flags; ++ _ossl_old_des_ecb_encrypt; ++ OCSP_response_get1_basic; ++ EVP_Digest; ++ OCSP_ONEREQ_delete_ext; ++ ASN1_TBOOLEAN_it; ++ ASN1_TBOOLEAN_it; ++ ASN1_item_new; ++ ASN1_TIME_to_generalizedtime; ++ BIGNUM_it; ++ BIGNUM_it; ++ AES_cbc_encrypt; ++ ENGINE_get_load_privkey_function; ++ ENGINE_get_load_privkey_fn; ++ OCSP_RESPONSE_free; ++ UI_method_set_reader; ++ i2d_ASN1_T61STRING; ++ EC_POINT_set_to_infinity; ++ ERR_load_OCSP_strings; ++ EC_POINT_point2oct; ++ KRB5_APREQ_free; ++ ASN1_OBJECT_it; ++ ASN1_OBJECT_it; ++ OCSP_crlID_new; ++ OCSP_crlID2_new; ++ CONF_modules_load_file; ++ CONF_imodule_set_usr_data; ++ ENGINE_set_default_string; ++ CONF_module_get_usr_data; ++ ASN1_add_oid_module; ++ CONF_modules_finish; ++ OPENSSL_config; ++ CONF_modules_unload; ++ CONF_imodule_get_value; ++ CONF_module_set_usr_data; ++ CONF_parse_list; ++ CONF_module_add; ++ CONF_get1_default_config_file; ++ CONF_imodule_get_flags; ++ CONF_imodule_get_module; ++ CONF_modules_load; ++ CONF_imodule_get_name; ++ ERR_peek_top_error; ++ CONF_imodule_get_usr_data; ++ CONF_imodule_set_flags; ++ ENGINE_add_conf_module; ++ ERR_peek_last_error_line; ++ ERR_peek_last_error_line_data; ++ ERR_peek_last_error; ++ DES_read_2passwords; ++ DES_read_password; ++ UI_UTIL_read_pw; ++ UI_UTIL_read_pw_string; ++ ENGINE_load_aep; ++ ENGINE_load_sureware; ++ OPENSSL_add_all_algorithms_noconf; ++ OPENSSL_add_all_algo_noconf; ++ OPENSSL_add_all_algorithms_conf; ++ OPENSSL_add_all_algo_conf; ++ OPENSSL_load_builtin_modules; ++ AES_ofb128_encrypt; ++ AES_ctr128_encrypt; ++ AES_cfb128_encrypt; ++ ENGINE_load_4758cca; ++ _ossl_096_des_random_seed; ++ EVP_aes_256_ofb; ++ EVP_aes_192_ofb; ++ EVP_aes_128_cfb128; ++ EVP_aes_256_cfb128; ++ EVP_aes_128_ofb; ++ EVP_aes_192_cfb128; ++ CONF_modules_free; ++ NCONF_default; ++ OPENSSL_no_config; ++ NCONF_WIN32; ++ ASN1_UNIVERSALSTRING_new; ++ EVP_des_ede_ecb; ++ i2d_ASN1_UNIVERSALSTRING; ++ ASN1_UNIVERSALSTRING_free; ++ ASN1_UNIVERSALSTRING_it; ++ ASN1_UNIVERSALSTRING_it; ++ d2i_ASN1_UNIVERSALSTRING; ++ EVP_des_ede3_ecb; ++ X509_REQ_print_ex; ++ ENGINE_up_ref; ++ BUF_MEM_grow_clean; ++ CRYPTO_realloc_clean; ++ BUF_strlcat; ++ BIO_indent; ++ BUF_strlcpy; ++ OpenSSLDie; ++ OPENSSL_cleanse; ++ ENGINE_setup_bsd_cryptodev; ++ ERR_release_err_state_table; ++ EVP_aes_128_cfb8; ++ FIPS_corrupt_rsa; ++ FIPS_selftest_des; ++ EVP_aes_128_cfb1; ++ EVP_aes_192_cfb8; ++ FIPS_mode_set; ++ FIPS_selftest_dsa; ++ EVP_aes_256_cfb8; ++ FIPS_allow_md5; ++ DES_ede3_cfb_encrypt; ++ EVP_des_ede3_cfb8; ++ FIPS_rand_seeded; ++ AES_cfbr_encrypt_block; ++ AES_cfb8_encrypt; ++ FIPS_rand_seed; ++ FIPS_corrupt_des; ++ EVP_aes_192_cfb1; ++ FIPS_selftest_aes; ++ FIPS_set_prng_key; ++ EVP_des_cfb8; ++ FIPS_corrupt_dsa; ++ FIPS_test_mode; ++ FIPS_rand_method; ++ EVP_aes_256_cfb1; ++ ERR_load_FIPS_strings; ++ FIPS_corrupt_aes; ++ FIPS_selftest_sha1; ++ FIPS_selftest_rsa; ++ FIPS_corrupt_sha1; ++ EVP_des_cfb1; ++ FIPS_dsa_check; ++ AES_cfb1_encrypt; ++ EVP_des_ede3_cfb1; ++ FIPS_rand_check; ++ FIPS_md5_allowed; ++ FIPS_mode; ++ FIPS_selftest_failed; ++ sk_is_sorted; ++ X509_check_ca; ++ HMAC_CTX_set_flags; ++ d2i_PROXY_CERT_INFO_EXTENSION; ++ PROXY_POLICY_it; ++ PROXY_POLICY_it; ++ i2d_PROXY_POLICY; ++ i2d_PROXY_CERT_INFO_EXTENSION; ++ d2i_PROXY_POLICY; ++ PROXY_CERT_INFO_EXTENSION_new; ++ PROXY_CERT_INFO_EXTENSION_free; ++ PROXY_CERT_INFO_EXTENSION_it; ++ PROXY_CERT_INFO_EXTENSION_it; ++ PROXY_POLICY_free; ++ PROXY_POLICY_new; ++ BN_MONT_CTX_set_locked; ++ FIPS_selftest_rng; ++ EVP_sha384; ++ EVP_sha512; ++ EVP_sha224; ++ EVP_sha256; ++ FIPS_selftest_hmac; ++ FIPS_corrupt_rng; ++ BN_mod_exp_mont_consttime; ++ RSA_X931_hash_id; ++ RSA_padding_check_X931; ++ RSA_verify_PKCS1_PSS; ++ RSA_padding_add_X931; ++ RSA_padding_add_PKCS1_PSS; ++ PKCS1_MGF1; ++ BN_X931_generate_Xpq; ++ RSA_X931_generate_key; ++ BN_X931_derive_prime; ++ BN_X931_generate_prime; ++ RSA_X931_derive; ++ BIO_new_dgram; ++ BN_get0_nist_prime_384; ++ ERR_set_mark; ++ X509_STORE_CTX_set0_crls; ++ ENGINE_set_STORE; ++ ENGINE_register_ECDSA; ++ STORE_meth_set_list_start_fn; ++ STORE_method_set_list_start_function; ++ BN_BLINDING_invert_ex; ++ NAME_CONSTRAINTS_free; ++ STORE_ATTR_INFO_set_number; ++ BN_BLINDING_get_thread_id; ++ X509_STORE_CTX_set0_param; ++ POLICY_MAPPING_it; ++ POLICY_MAPPING_it; ++ STORE_parse_attrs_start; ++ POLICY_CONSTRAINTS_free; ++ EVP_PKEY_add1_attr_by_NID; ++ BN_nist_mod_192; ++ EC_GROUP_get_trinomial_basis; ++ STORE_set_method; ++ GENERAL_SUBTREE_free; ++ NAME_CONSTRAINTS_it; ++ NAME_CONSTRAINTS_it; ++ ECDH_get_default_method; ++ PKCS12_add_safe; ++ EC_KEY_new_by_curve_name; ++ STORE_meth_get_update_store_fn; ++ STORE_method_get_update_store_function; ++ ENGINE_register_ECDH; ++ SHA512_Update; ++ i2d_ECPrivateKey; ++ BN_get0_nist_prime_192; ++ STORE_modify_certificate; ++ EC_POINT_set_affine_coordinates_GF2m; ++ EC_POINT_set_affine_coords_GF2m; ++ BN_GF2m_mod_exp_arr; ++ STORE_ATTR_INFO_modify_number; ++ X509_keyid_get0; ++ ENGINE_load_gmp; ++ pitem_new; ++ BN_GF2m_mod_mul_arr; ++ STORE_list_public_key_endp; ++ o2i_ECPublicKey; ++ EC_KEY_copy; ++ BIO_dump_fp; ++ X509_policy_node_get0_parent; ++ EC_GROUP_check_discriminant; ++ i2o_ECPublicKey; ++ EC_KEY_precompute_mult; ++ a2i_IPADDRESS; ++ STORE_meth_set_initialise_fn; ++ STORE_method_set_initialise_function; ++ X509_STORE_CTX_set_depth; ++ X509_VERIFY_PARAM_inherit; ++ EC_POINT_point2bn; ++ STORE_ATTR_INFO_set_dn; ++ X509_policy_tree_get0_policies; ++ EC_GROUP_new_curve_GF2m; ++ STORE_destroy_method; ++ ENGINE_unregister_STORE; ++ EVP_PKEY_get1_EC_KEY; ++ STORE_ATTR_INFO_get0_number; ++ ENGINE_get_default_ECDH; ++ EC_KEY_get_conv_form; ++ ASN1_OCTET_STRING_NDEF_it; ++ ASN1_OCTET_STRING_NDEF_it; ++ STORE_delete_public_key; ++ STORE_get_public_key; ++ STORE_modify_arbitrary; ++ ENGINE_get_static_state; ++ pqueue_iterator; ++ ECDSA_SIG_new; ++ OPENSSL_DIR_end; ++ BN_GF2m_mod_sqr; ++ EC_POINT_bn2point; ++ X509_VERIFY_PARAM_set_depth; ++ EC_KEY_set_asn1_flag; ++ STORE_get_method; ++ EC_KEY_get_key_method_data; ++ ECDSA_sign_ex; ++ STORE_parse_attrs_end; ++ EC_GROUP_get_point_conversion_form; ++ EC_GROUP_get_point_conv_form; ++ STORE_method_set_store_function; ++ STORE_ATTR_INFO_in; ++ PEM_read_bio_ECPKParameters; ++ EC_GROUP_get_pentanomial_basis; ++ EVP_PKEY_add1_attr_by_txt; ++ BN_BLINDING_set_flags; ++ X509_VERIFY_PARAM_set1_policies; ++ X509_VERIFY_PARAM_set1_name; ++ X509_VERIFY_PARAM_set_purpose; ++ STORE_get_number; ++ ECDSA_sign_setup; ++ BN_GF2m_mod_solve_quad_arr; ++ EC_KEY_up_ref; ++ POLICY_MAPPING_free; ++ BN_GF2m_mod_div; ++ X509_VERIFY_PARAM_set_flags; ++ EC_KEY_free; ++ STORE_meth_set_list_next_fn; ++ STORE_method_set_list_next_function; ++ PEM_write_bio_ECPrivateKey; ++ d2i_EC_PUBKEY; ++ STORE_meth_get_generate_fn; ++ STORE_method_get_generate_function; ++ STORE_meth_set_list_end_fn; ++ STORE_method_set_list_end_function; ++ pqueue_print; ++ EC_GROUP_have_precompute_mult; ++ EC_KEY_print_fp; ++ BN_GF2m_mod_arr; ++ PEM_write_bio_X509_CERT_PAIR; ++ EVP_PKEY_cmp; ++ X509_policy_level_node_count; ++ STORE_new_engine; ++ STORE_list_public_key_start; ++ X509_VERIFY_PARAM_new; ++ ECDH_get_ex_data; ++ EVP_PKEY_get_attr; ++ ECDSA_do_sign; ++ ENGINE_unregister_ECDH; ++ ECDH_OpenSSL; ++ EC_KEY_set_conv_form; ++ EC_POINT_dup; ++ GENERAL_SUBTREE_new; ++ STORE_list_crl_endp; ++ EC_get_builtin_curves; ++ X509_policy_node_get0_qualifiers; ++ X509_pcy_node_get0_qualifiers; ++ STORE_list_crl_end; ++ EVP_PKEY_set1_EC_KEY; ++ BN_GF2m_mod_sqrt_arr; ++ i2d_ECPrivateKey_bio; ++ ECPKParameters_print_fp; ++ pqueue_find; ++ ECDSA_SIG_free; ++ PEM_write_bio_ECPKParameters; ++ STORE_method_set_ctrl_function; ++ STORE_list_public_key_end; ++ EC_KEY_set_private_key; ++ pqueue_peek; ++ STORE_get_arbitrary; ++ STORE_store_crl; ++ X509_policy_node_get0_policy; ++ PKCS12_add_safes; ++ BN_BLINDING_convert_ex; ++ X509_policy_tree_free; ++ OPENSSL_ia32cap_loc; ++ BN_GF2m_poly2arr; ++ STORE_ctrl; ++ STORE_ATTR_INFO_compare; ++ BN_get0_nist_prime_224; ++ i2d_ECParameters; ++ i2d_ECPKParameters; ++ BN_GENCB_call; ++ d2i_ECPKParameters; ++ STORE_meth_set_generate_fn; ++ STORE_method_set_generate_function; ++ ENGINE_set_ECDH; ++ NAME_CONSTRAINTS_new; ++ SHA256_Init; ++ EC_KEY_get0_public_key; ++ PEM_write_bio_EC_PUBKEY; ++ STORE_ATTR_INFO_set_cstr; ++ STORE_list_crl_next; ++ STORE_ATTR_INFO_in_range; ++ ECParameters_print; ++ STORE_meth_set_delete_fn; ++ STORE_method_set_delete_function; ++ STORE_list_certificate_next; ++ ASN1_generate_nconf; ++ BUF_memdup; ++ BN_GF2m_mod_mul; ++ STORE_meth_get_list_next_fn; ++ STORE_method_get_list_next_function; ++ STORE_ATTR_INFO_get0_dn; ++ STORE_list_private_key_next; ++ EC_GROUP_set_seed; ++ X509_VERIFY_PARAM_set_trust; ++ STORE_ATTR_INFO_free; ++ STORE_get_private_key; ++ EVP_PKEY_get_attr_count; ++ STORE_ATTR_INFO_new; ++ EC_GROUP_get_curve_GF2m; ++ STORE_meth_set_revoke_fn; ++ STORE_method_set_revoke_function; ++ STORE_store_number; ++ BN_is_prime_ex; ++ STORE_revoke_public_key; ++ X509_STORE_CTX_get0_param; ++ STORE_delete_arbitrary; ++ PEM_read_X509_CERT_PAIR; ++ X509_STORE_set_depth; ++ ECDSA_get_ex_data; ++ SHA224; ++ BIO_dump_indent_fp; ++ EC_KEY_set_group; ++ BUF_strndup; ++ STORE_list_certificate_start; ++ BN_GF2m_mod; ++ X509_REQ_check_private_key; ++ EC_GROUP_get_seed_len; ++ ERR_load_STORE_strings; ++ PEM_read_bio_EC_PUBKEY; ++ STORE_list_private_key_end; ++ i2d_EC_PUBKEY; ++ ECDSA_get_default_method; ++ ASN1_put_eoc; ++ X509_STORE_CTX_get_explicit_policy; ++ X509_STORE_CTX_get_expl_policy; ++ X509_VERIFY_PARAM_table_cleanup; ++ STORE_modify_private_key; ++ X509_VERIFY_PARAM_free; ++ EC_METHOD_get_field_type; ++ EC_GFp_nist_method; ++ STORE_meth_set_modify_fn; ++ STORE_method_set_modify_function; ++ STORE_parse_attrs_next; ++ ENGINE_load_padlock; ++ EC_GROUP_set_curve_name; ++ X509_CERT_PAIR_it; ++ X509_CERT_PAIR_it; ++ STORE_meth_get_revoke_fn; ++ STORE_method_get_revoke_function; ++ STORE_method_set_get_function; ++ STORE_modify_number; ++ STORE_method_get_store_function; ++ STORE_store_private_key; ++ BN_GF2m_mod_sqr_arr; ++ RSA_setup_blinding; ++ BIO_s_datagram; ++ STORE_Memory; ++ sk_find_ex; ++ EC_GROUP_set_curve_GF2m; ++ ENGINE_set_default_ECDSA; ++ POLICY_CONSTRAINTS_new; ++ BN_GF2m_mod_sqrt; ++ ECDH_set_default_method; ++ EC_KEY_generate_key; ++ SHA384_Update; ++ BN_GF2m_arr2poly; ++ STORE_method_get_get_function; ++ STORE_meth_set_cleanup_fn; ++ STORE_method_set_cleanup_function; ++ EC_GROUP_check; ++ d2i_ECPrivateKey_bio; ++ EC_KEY_insert_key_method_data; ++ STORE_meth_get_lock_store_fn; ++ STORE_method_get_lock_store_function; ++ X509_VERIFY_PARAM_get_depth; ++ SHA224_Final; ++ STORE_meth_set_update_store_fn; ++ STORE_method_set_update_store_function; ++ SHA224_Update; ++ d2i_ECPrivateKey; ++ ASN1_item_ndef_i2d; ++ STORE_delete_private_key; ++ ERR_pop_to_mark; ++ ENGINE_register_all_STORE; ++ X509_policy_level_get0_node; ++ i2d_PKCS7_NDEF; ++ EC_GROUP_get_degree; ++ ASN1_generate_v3; ++ STORE_ATTR_INFO_modify_cstr; ++ X509_policy_tree_level_count; ++ BN_GF2m_add; ++ EC_KEY_get0_group; ++ STORE_generate_crl; ++ STORE_store_public_key; ++ X509_CERT_PAIR_free; ++ STORE_revoke_private_key; ++ BN_nist_mod_224; ++ SHA512_Final; ++ STORE_ATTR_INFO_modify_dn; ++ STORE_meth_get_initialise_fn; ++ STORE_method_get_initialise_function; ++ STORE_delete_number; ++ i2d_EC_PUBKEY_bio; ++ BIO_dgram_non_fatal_error; ++ EC_GROUP_get_asn1_flag; ++ STORE_ATTR_INFO_in_ex; ++ STORE_list_crl_start; ++ ECDH_get_ex_new_index; ++ STORE_meth_get_modify_fn; ++ STORE_method_get_modify_function; ++ v2i_ASN1_BIT_STRING; ++ STORE_store_certificate; ++ OBJ_bsearch_ex; ++ X509_STORE_CTX_set_default; ++ STORE_ATTR_INFO_set_sha1str; ++ BN_GF2m_mod_inv; ++ BN_GF2m_mod_exp; ++ STORE_modify_public_key; ++ STORE_meth_get_list_start_fn; ++ STORE_method_get_list_start_function; ++ EC_GROUP_get0_seed; ++ STORE_store_arbitrary; ++ STORE_meth_set_unlock_store_fn; ++ STORE_method_set_unlock_store_function; ++ BN_GF2m_mod_div_arr; ++ ENGINE_set_ECDSA; ++ STORE_create_method; ++ ECPKParameters_print; ++ EC_KEY_get0_private_key; ++ PEM_write_EC_PUBKEY; ++ X509_VERIFY_PARAM_set1; ++ ECDH_set_method; ++ v2i_GENERAL_NAME_ex; ++ ECDH_set_ex_data; ++ STORE_generate_key; ++ BN_nist_mod_521; ++ X509_policy_tree_get0_level; ++ EC_GROUP_set_point_conversion_form; ++ EC_GROUP_set_point_conv_form; ++ PEM_read_EC_PUBKEY; ++ i2d_ECDSA_SIG; ++ ECDSA_OpenSSL; ++ STORE_delete_crl; ++ EC_KEY_get_enc_flags; ++ ASN1_const_check_infinite_end; ++ EVP_PKEY_delete_attr; ++ ECDSA_set_default_method; ++ EC_POINT_set_compressed_coordinates_GF2m; ++ EC_POINT_set_compr_coords_GF2m; ++ EC_GROUP_cmp; ++ STORE_revoke_certificate; ++ BN_get0_nist_prime_256; ++ STORE_meth_get_delete_fn; ++ STORE_method_get_delete_function; ++ SHA224_Init; ++ PEM_read_ECPrivateKey; ++ SHA512_Init; ++ STORE_parse_attrs_endp; ++ BN_set_negative; ++ ERR_load_ECDSA_strings; ++ EC_GROUP_get_basis_type; ++ STORE_list_public_key_next; ++ i2v_ASN1_BIT_STRING; ++ STORE_OBJECT_free; ++ BN_nist_mod_384; ++ i2d_X509_CERT_PAIR; ++ PEM_write_ECPKParameters; ++ ECDH_compute_key; ++ STORE_ATTR_INFO_get0_sha1str; ++ ENGINE_register_all_ECDH; ++ pqueue_pop; ++ STORE_ATTR_INFO_get0_cstr; ++ POLICY_CONSTRAINTS_it; ++ POLICY_CONSTRAINTS_it; ++ STORE_get_ex_new_index; ++ EVP_PKEY_get_attr_by_OBJ; ++ X509_VERIFY_PARAM_add0_policy; ++ BN_GF2m_mod_solve_quad; ++ SHA256; ++ i2d_ECPrivateKey_fp; ++ X509_policy_tree_get0_user_policies; ++ X509_pcy_tree_get0_usr_policies; ++ OPENSSL_DIR_read; ++ ENGINE_register_all_ECDSA; ++ X509_VERIFY_PARAM_lookup; ++ EC_POINT_get_affine_coordinates_GF2m; ++ EC_POINT_get_affine_coords_GF2m; ++ EC_GROUP_dup; ++ ENGINE_get_default_ECDSA; ++ EC_KEY_new; ++ SHA256_Transform; ++ EC_KEY_set_enc_flags; ++ ECDSA_verify; ++ EC_POINT_point2hex; ++ ENGINE_get_STORE; ++ SHA512; ++ STORE_get_certificate; ++ ECDSA_do_sign_ex; ++ ECDSA_do_verify; ++ d2i_ECPrivateKey_fp; ++ STORE_delete_certificate; ++ SHA512_Transform; ++ X509_STORE_set1_param; ++ STORE_method_get_ctrl_function; ++ STORE_free; ++ PEM_write_ECPrivateKey; ++ STORE_meth_get_unlock_store_fn; ++ STORE_method_get_unlock_store_function; ++ STORE_get_ex_data; ++ EC_KEY_set_public_key; ++ PEM_read_ECPKParameters; ++ X509_CERT_PAIR_new; ++ ENGINE_register_STORE; ++ RSA_generate_key_ex; ++ DSA_generate_parameters_ex; ++ ECParameters_print_fp; ++ X509V3_NAME_from_section; ++ EVP_PKEY_add1_attr; ++ STORE_modify_crl; ++ STORE_list_private_key_start; ++ POLICY_MAPPINGS_it; ++ POLICY_MAPPINGS_it; ++ GENERAL_SUBTREE_it; ++ GENERAL_SUBTREE_it; ++ EC_GROUP_get_curve_name; ++ PEM_write_X509_CERT_PAIR; ++ BIO_dump_indent_cb; ++ d2i_X509_CERT_PAIR; ++ STORE_list_private_key_endp; ++ asn1_const_Finish; ++ i2d_EC_PUBKEY_fp; ++ BN_nist_mod_256; ++ X509_VERIFY_PARAM_add0_table; ++ pqueue_free; ++ BN_BLINDING_create_param; ++ ECDSA_size; ++ d2i_EC_PUBKEY_bio; ++ BN_get0_nist_prime_521; ++ STORE_ATTR_INFO_modify_sha1str; ++ BN_generate_prime_ex; ++ EC_GROUP_new_by_curve_name; ++ SHA256_Final; ++ DH_generate_parameters_ex; ++ PEM_read_bio_ECPrivateKey; ++ STORE_meth_get_cleanup_fn; ++ STORE_method_get_cleanup_function; ++ ENGINE_get_ECDH; ++ d2i_ECDSA_SIG; ++ BN_is_prime_fasttest_ex; ++ ECDSA_sign; ++ X509_policy_check; ++ EVP_PKEY_get_attr_by_NID; ++ STORE_set_ex_data; ++ ENGINE_get_ECDSA; ++ EVP_ecdsa; ++ BN_BLINDING_get_flags; ++ PKCS12_add_cert; ++ STORE_OBJECT_new; ++ ERR_load_ECDH_strings; ++ EC_KEY_dup; ++ EVP_CIPHER_CTX_rand_key; ++ ECDSA_set_method; ++ a2i_IPADDRESS_NC; ++ d2i_ECParameters; ++ STORE_list_certificate_end; ++ STORE_get_crl; ++ X509_POLICY_NODE_print; ++ SHA384_Init; ++ EC_GF2m_simple_method; ++ ECDSA_set_ex_data; ++ SHA384_Final; ++ PKCS7_set_digest; ++ EC_KEY_print; ++ STORE_meth_set_lock_store_fn; ++ STORE_method_set_lock_store_function; ++ ECDSA_get_ex_new_index; ++ SHA384; ++ POLICY_MAPPING_new; ++ STORE_list_certificate_endp; ++ X509_STORE_CTX_get0_policy_tree; ++ EC_GROUP_set_asn1_flag; ++ EC_KEY_check_key; ++ d2i_EC_PUBKEY_fp; ++ PKCS7_set0_type_other; ++ PEM_read_bio_X509_CERT_PAIR; ++ pqueue_next; ++ STORE_meth_get_list_end_fn; ++ STORE_method_get_list_end_function; ++ EVP_PKEY_add1_attr_by_OBJ; ++ X509_VERIFY_PARAM_set_time; ++ pqueue_new; ++ ENGINE_set_default_ECDH; ++ STORE_new_method; ++ PKCS12_add_key; ++ DSO_merge; ++ EC_POINT_hex2point; ++ BIO_dump_cb; ++ SHA256_Update; ++ pqueue_insert; ++ pitem_free; ++ BN_GF2m_mod_inv_arr; ++ ENGINE_unregister_ECDSA; ++ BN_BLINDING_set_thread_id; ++ get_rfc3526_prime_8192; ++ X509_VERIFY_PARAM_clear_flags; ++ get_rfc2409_prime_1024; ++ DH_check_pub_key; ++ get_rfc3526_prime_2048; ++ get_rfc3526_prime_6144; ++ get_rfc3526_prime_1536; ++ get_rfc3526_prime_3072; ++ get_rfc3526_prime_4096; ++ get_rfc2409_prime_768; ++ X509_VERIFY_PARAM_get_flags; ++ EVP_CIPHER_CTX_new; ++ EVP_CIPHER_CTX_free; ++ Camellia_cbc_encrypt; ++ Camellia_cfb128_encrypt; ++ Camellia_cfb1_encrypt; ++ Camellia_cfb8_encrypt; ++ Camellia_ctr128_encrypt; ++ Camellia_cfbr_encrypt_block; ++ Camellia_decrypt; ++ Camellia_ecb_encrypt; ++ Camellia_encrypt; ++ Camellia_ofb128_encrypt; ++ Camellia_set_key; ++ EVP_camellia_128_cbc; ++ EVP_camellia_128_cfb128; ++ EVP_camellia_128_cfb1; ++ EVP_camellia_128_cfb8; ++ EVP_camellia_128_ecb; ++ EVP_camellia_128_ofb; ++ EVP_camellia_192_cbc; ++ EVP_camellia_192_cfb128; ++ EVP_camellia_192_cfb1; ++ EVP_camellia_192_cfb8; ++ EVP_camellia_192_ecb; ++ EVP_camellia_192_ofb; ++ EVP_camellia_256_cbc; ++ EVP_camellia_256_cfb128; ++ EVP_camellia_256_cfb1; ++ EVP_camellia_256_cfb8; ++ EVP_camellia_256_ecb; ++ EVP_camellia_256_ofb; ++ a2i_ipadd; ++ ASIdentifiers_free; ++ i2d_ASIdOrRange; ++ EVP_CIPHER_block_size; ++ v3_asid_is_canonical; ++ IPAddressChoice_free; ++ EVP_CIPHER_CTX_set_app_data; ++ BIO_set_callback_arg; ++ v3_addr_add_prefix; ++ IPAddressOrRange_it; ++ IPAddressOrRange_it; ++ BIO_set_flags; ++ ASIdentifiers_it; ++ ASIdentifiers_it; ++ v3_addr_get_range; ++ BIO_method_type; ++ v3_addr_inherits; ++ IPAddressChoice_it; ++ IPAddressChoice_it; ++ AES_ige_encrypt; ++ v3_addr_add_range; ++ EVP_CIPHER_CTX_nid; ++ d2i_ASRange; ++ v3_addr_add_inherit; ++ v3_asid_add_id_or_range; ++ v3_addr_validate_resource_set; ++ EVP_CIPHER_iv_length; ++ EVP_MD_type; ++ v3_asid_canonize; ++ IPAddressRange_free; ++ v3_asid_add_inherit; ++ EVP_CIPHER_CTX_key_length; ++ IPAddressRange_new; ++ ASIdOrRange_new; ++ EVP_MD_size; ++ EVP_MD_CTX_test_flags; ++ BIO_clear_flags; ++ i2d_ASRange; ++ IPAddressRange_it; ++ IPAddressRange_it; ++ IPAddressChoice_new; ++ ASIdentifierChoice_new; ++ ASRange_free; ++ EVP_MD_pkey_type; ++ EVP_MD_CTX_clear_flags; ++ IPAddressFamily_free; ++ i2d_IPAddressFamily; ++ IPAddressOrRange_new; ++ EVP_CIPHER_flags; ++ v3_asid_validate_resource_set; ++ d2i_IPAddressRange; ++ AES_bi_ige_encrypt; ++ BIO_get_callback; ++ IPAddressOrRange_free; ++ v3_addr_subset; ++ d2i_IPAddressFamily; ++ v3_asid_subset; ++ BIO_test_flags; ++ i2d_ASIdentifierChoice; ++ ASRange_it; ++ ASRange_it; ++ d2i_ASIdentifiers; ++ ASRange_new; ++ d2i_IPAddressChoice; ++ v3_addr_get_afi; ++ EVP_CIPHER_key_length; ++ EVP_Cipher; ++ i2d_IPAddressOrRange; ++ ASIdOrRange_it; ++ ASIdOrRange_it; ++ EVP_CIPHER_nid; ++ i2d_IPAddressChoice; ++ EVP_CIPHER_CTX_block_size; ++ ASIdentifiers_new; ++ v3_addr_validate_path; ++ IPAddressFamily_new; ++ EVP_MD_CTX_set_flags; ++ v3_addr_is_canonical; ++ i2d_IPAddressRange; ++ IPAddressFamily_it; ++ IPAddressFamily_it; ++ v3_asid_inherits; ++ EVP_CIPHER_CTX_cipher; ++ EVP_CIPHER_CTX_get_app_data; ++ EVP_MD_block_size; ++ EVP_CIPHER_CTX_flags; ++ v3_asid_validate_path; ++ d2i_IPAddressOrRange; ++ v3_addr_canonize; ++ ASIdentifierChoice_it; ++ ASIdentifierChoice_it; ++ EVP_MD_CTX_md; ++ d2i_ASIdentifierChoice; ++ BIO_method_name; ++ EVP_CIPHER_CTX_iv_length; ++ ASIdOrRange_free; ++ ASIdentifierChoice_free; ++ BIO_get_callback_arg; ++ BIO_set_callback; ++ d2i_ASIdOrRange; ++ i2d_ASIdentifiers; ++ SEED_decrypt; ++ SEED_encrypt; ++ SEED_cbc_encrypt; ++ EVP_seed_ofb; ++ SEED_cfb128_encrypt; ++ SEED_ofb128_encrypt; ++ EVP_seed_cbc; ++ SEED_ecb_encrypt; ++ EVP_seed_ecb; ++ SEED_set_key; ++ EVP_seed_cfb128; ++ X509_EXTENSIONS_it; ++ X509_EXTENSIONS_it; ++ X509_get1_ocsp; ++ OCSP_REQ_CTX_free; ++ i2d_X509_EXTENSIONS; ++ OCSP_sendreq_nbio; ++ OCSP_sendreq_new; ++ d2i_X509_EXTENSIONS; ++ X509_ALGORS_it; ++ X509_ALGORS_it; ++ X509_ALGOR_get0; ++ X509_ALGOR_set0; ++ AES_unwrap_key; ++ AES_wrap_key; ++ X509at_get0_data_by_OBJ; ++ ASN1_TYPE_set1; ++ ASN1_STRING_set0; ++ i2d_X509_ALGORS; ++ BIO_f_zlib; ++ COMP_zlib_cleanup; ++ d2i_X509_ALGORS; ++ CMS_ReceiptRequest_free; ++ PEM_write_CMS; ++ CMS_add0_CertificateChoices; ++ CMS_unsigned_add1_attr_by_OBJ; ++ ERR_load_CMS_strings; ++ CMS_sign_receipt; ++ i2d_CMS_ContentInfo; ++ CMS_signed_delete_attr; ++ d2i_CMS_bio; ++ CMS_unsigned_get_attr_by_NID; ++ CMS_verify; ++ SMIME_read_CMS; ++ CMS_decrypt_set1_key; ++ CMS_SignerInfo_get0_algs; ++ CMS_add1_cert; ++ CMS_set_detached; ++ CMS_encrypt; ++ CMS_EnvelopedData_create; ++ CMS_uncompress; ++ CMS_add0_crl; ++ CMS_SignerInfo_verify_content; ++ CMS_unsigned_get0_data_by_OBJ; ++ PEM_write_bio_CMS; ++ CMS_unsigned_get_attr; ++ CMS_RecipientInfo_ktri_cert_cmp; ++ CMS_RecipientInfo_ktri_get0_algs; ++ CMS_RecipInfo_ktri_get0_algs; ++ CMS_ContentInfo_free; ++ CMS_final; ++ CMS_add_simple_smimecap; ++ CMS_SignerInfo_verify; ++ CMS_data; ++ CMS_ContentInfo_it; ++ CMS_ContentInfo_it; ++ d2i_CMS_ReceiptRequest; ++ CMS_compress; ++ CMS_digest_create; ++ CMS_SignerInfo_cert_cmp; ++ CMS_SignerInfo_sign; ++ CMS_data_create; ++ i2d_CMS_bio; ++ CMS_EncryptedData_set1_key; ++ CMS_decrypt; ++ int_smime_write_ASN1; ++ CMS_unsigned_delete_attr; ++ CMS_unsigned_get_attr_count; ++ CMS_add_smimecap; ++ PEM_read_CMS; ++ CMS_signed_get_attr_by_OBJ; ++ d2i_CMS_ContentInfo; ++ CMS_add_standard_smimecap; ++ CMS_ContentInfo_new; ++ CMS_RecipientInfo_type; ++ CMS_get0_type; ++ CMS_is_detached; ++ CMS_sign; ++ CMS_signed_add1_attr; ++ CMS_unsigned_get_attr_by_OBJ; ++ SMIME_write_CMS; ++ CMS_EncryptedData_decrypt; ++ CMS_get0_RecipientInfos; ++ CMS_add0_RevocationInfoChoice; ++ CMS_decrypt_set1_pkey; ++ CMS_SignerInfo_set1_signer_cert; ++ CMS_get0_signers; ++ CMS_ReceiptRequest_get0_values; ++ CMS_signed_get0_data_by_OBJ; ++ CMS_get0_SignerInfos; ++ CMS_add0_cert; ++ CMS_EncryptedData_encrypt; ++ CMS_digest_verify; ++ CMS_set1_signers_certs; ++ CMS_signed_get_attr; ++ CMS_RecipientInfo_set0_key; ++ CMS_SignedData_init; ++ CMS_RecipientInfo_kekri_get0_id; ++ CMS_verify_receipt; ++ CMS_ReceiptRequest_it; ++ CMS_ReceiptRequest_it; ++ PEM_read_bio_CMS; ++ CMS_get1_crls; ++ CMS_add0_recipient_key; ++ SMIME_read_ASN1; ++ CMS_ReceiptRequest_new; ++ CMS_get0_content; ++ CMS_get1_ReceiptRequest; ++ CMS_signed_add1_attr_by_OBJ; ++ CMS_RecipientInfo_kekri_id_cmp; ++ CMS_add1_ReceiptRequest; ++ CMS_SignerInfo_get0_signer_id; ++ CMS_unsigned_add1_attr_by_NID; ++ CMS_unsigned_add1_attr; ++ CMS_signed_get_attr_by_NID; ++ CMS_get1_certs; ++ CMS_signed_add1_attr_by_NID; ++ CMS_unsigned_add1_attr_by_txt; ++ CMS_dataFinal; ++ CMS_RecipientInfo_ktri_get0_signer_id; ++ CMS_RecipInfo_ktri_get0_sigr_id; ++ i2d_CMS_ReceiptRequest; ++ CMS_add1_recipient_cert; ++ CMS_dataInit; ++ CMS_signed_add1_attr_by_txt; ++ CMS_RecipientInfo_decrypt; ++ CMS_signed_get_attr_count; ++ CMS_get0_eContentType; ++ CMS_set1_eContentType; ++ CMS_ReceiptRequest_create0; ++ CMS_add1_signer; ++ CMS_RecipientInfo_set0_pkey; ++ ENGINE_set_load_ssl_client_cert_function; ++ ENGINE_set_ld_ssl_clnt_cert_fn; ++ ENGINE_get_ssl_client_cert_function; ++ ENGINE_get_ssl_client_cert_fn; ++ ENGINE_load_ssl_client_cert; ++ ENGINE_load_capi; ++ OPENSSL_isservice; ++ FIPS_dsa_sig_decode; ++ EVP_CIPHER_CTX_clear_flags; ++ FIPS_rand_status; ++ FIPS_rand_set_key; ++ CRYPTO_set_mem_info_functions; ++ RSA_X931_generate_key_ex; ++ int_ERR_set_state_func; ++ int_EVP_MD_set_engine_callbacks; ++ int_CRYPTO_set_do_dynlock_callback; ++ FIPS_rng_stick; ++ EVP_CIPHER_CTX_set_flags; ++ BN_X931_generate_prime_ex; ++ FIPS_selftest_check; ++ FIPS_rand_set_dt; ++ CRYPTO_dbg_pop_info; ++ FIPS_dsa_free; ++ RSA_X931_derive_ex; ++ FIPS_rsa_new; ++ FIPS_rand_bytes; ++ fips_cipher_test; ++ EVP_CIPHER_CTX_test_flags; ++ CRYPTO_malloc_debug_init; ++ CRYPTO_dbg_push_info; ++ FIPS_corrupt_rsa_keygen; ++ FIPS_dh_new; ++ FIPS_corrupt_dsa_keygen; ++ FIPS_dh_free; ++ fips_pkey_signature_test; ++ EVP_add_alg_module; ++ int_RAND_init_engine_callbacks; ++ int_EVP_CIPHER_set_engine_callbacks; ++ int_EVP_MD_init_engine_callbacks; ++ FIPS_rand_test_mode; ++ FIPS_rand_reset; ++ FIPS_dsa_new; ++ int_RAND_set_callbacks; ++ BN_X931_derive_prime_ex; ++ int_ERR_lib_init; ++ int_EVP_CIPHER_init_engine_callbacks; ++ FIPS_rsa_free; ++ FIPS_dsa_sig_encode; ++ CRYPTO_dbg_remove_all_info; ++ OPENSSL_init; ++ CRYPTO_strdup; ++ JPAKE_STEP3A_process; ++ JPAKE_STEP1_release; ++ JPAKE_get_shared_key; ++ JPAKE_STEP3B_init; ++ JPAKE_STEP1_generate; ++ JPAKE_STEP1_init; ++ JPAKE_STEP3B_process; ++ JPAKE_STEP2_generate; ++ JPAKE_CTX_new; ++ JPAKE_CTX_free; ++ JPAKE_STEP3B_release; ++ JPAKE_STEP3A_release; ++ JPAKE_STEP2_process; ++ JPAKE_STEP3B_generate; ++ JPAKE_STEP1_process; ++ JPAKE_STEP3A_generate; ++ JPAKE_STEP2_release; ++ JPAKE_STEP3A_init; ++ ERR_load_JPAKE_strings; ++ JPAKE_STEP2_init; ++ pqueue_size; ++ i2d_TS_ACCURACY; ++ i2d_TS_MSG_IMPRINT_fp; ++ i2d_TS_MSG_IMPRINT; ++ EVP_PKEY_print_public; ++ EVP_PKEY_CTX_new; ++ i2d_TS_TST_INFO; ++ EVP_PKEY_asn1_find; ++ DSO_METHOD_beos; ++ TS_CONF_load_cert; ++ TS_REQ_get_ext; ++ EVP_PKEY_sign_init; ++ ASN1_item_print; ++ TS_TST_INFO_set_nonce; ++ TS_RESP_dup; ++ ENGINE_register_pkey_meths; ++ EVP_PKEY_asn1_add0; ++ PKCS7_add0_attrib_signing_time; ++ i2d_TS_TST_INFO_fp; ++ BIO_asn1_get_prefix; ++ TS_TST_INFO_set_time; ++ EVP_PKEY_meth_set_decrypt; ++ EVP_PKEY_set_type_str; ++ EVP_PKEY_CTX_get_keygen_info; ++ TS_REQ_set_policy_id; ++ d2i_TS_RESP_fp; ++ ENGINE_get_pkey_asn1_meth_engine; ++ ENGINE_get_pkey_asn1_meth_eng; ++ WHIRLPOOL_Init; ++ TS_RESP_set_status_info; ++ EVP_PKEY_keygen; ++ EVP_DigestSignInit; ++ TS_ACCURACY_set_millis; ++ TS_REQ_dup; ++ GENERAL_NAME_dup; ++ ASN1_SEQUENCE_ANY_it; ++ ASN1_SEQUENCE_ANY_it; ++ WHIRLPOOL; ++ X509_STORE_get1_crls; ++ ENGINE_get_pkey_asn1_meth; ++ EVP_PKEY_asn1_new; ++ BIO_new_NDEF; ++ ENGINE_get_pkey_meth; ++ TS_MSG_IMPRINT_set_algo; ++ i2d_TS_TST_INFO_bio; ++ TS_TST_INFO_set_ordering; ++ TS_TST_INFO_get_ext_by_OBJ; ++ CRYPTO_THREADID_set_pointer; ++ TS_CONF_get_tsa_section; ++ SMIME_write_ASN1; ++ TS_RESP_CTX_set_signer_key; ++ EVP_PKEY_encrypt_old; ++ EVP_PKEY_encrypt_init; ++ CRYPTO_THREADID_cpy; ++ ASN1_PCTX_get_cert_flags; ++ i2d_ESS_SIGNING_CERT; ++ TS_CONF_load_key; ++ i2d_ASN1_SEQUENCE_ANY; ++ d2i_TS_MSG_IMPRINT_bio; ++ EVP_PKEY_asn1_set_public; ++ b2i_PublicKey_bio; ++ BIO_asn1_set_prefix; ++ EVP_PKEY_new_mac_key; ++ BIO_new_CMS; ++ CRYPTO_THREADID_cmp; ++ TS_REQ_ext_free; ++ EVP_PKEY_asn1_set_free; ++ EVP_PKEY_get0_asn1; ++ d2i_NETSCAPE_X509; ++ EVP_PKEY_verify_recover_init; ++ EVP_PKEY_CTX_set_data; ++ EVP_PKEY_keygen_init; ++ TS_RESP_CTX_set_status_info; ++ TS_MSG_IMPRINT_get_algo; ++ TS_REQ_print_bio; ++ EVP_PKEY_CTX_ctrl_str; ++ EVP_PKEY_get_default_digest_nid; ++ PEM_write_bio_PKCS7_stream; ++ TS_MSG_IMPRINT_print_bio; ++ BN_asc2bn; ++ TS_REQ_get_policy_id; ++ ENGINE_set_default_pkey_asn1_meths; ++ ENGINE_set_def_pkey_asn1_meths; ++ d2i_TS_ACCURACY; ++ DSO_global_lookup; ++ TS_CONF_set_tsa_name; ++ i2d_ASN1_SET_ANY; ++ ENGINE_load_gost; ++ WHIRLPOOL_BitUpdate; ++ ASN1_PCTX_get_flags; ++ TS_TST_INFO_get_ext_by_NID; ++ TS_RESP_new; ++ ESS_CERT_ID_dup; ++ TS_STATUS_INFO_dup; ++ TS_REQ_delete_ext; ++ EVP_DigestVerifyFinal; ++ EVP_PKEY_print_params; ++ i2d_CMS_bio_stream; ++ TS_REQ_get_msg_imprint; ++ OBJ_find_sigid_by_algs; ++ TS_TST_INFO_get_serial; ++ TS_REQ_get_nonce; ++ X509_PUBKEY_set0_param; ++ EVP_PKEY_CTX_set0_keygen_info; ++ DIST_POINT_set_dpname; ++ i2d_ISSUING_DIST_POINT; ++ ASN1_SET_ANY_it; ++ ASN1_SET_ANY_it; ++ EVP_PKEY_CTX_get_data; ++ TS_STATUS_INFO_print_bio; ++ EVP_PKEY_derive_init; ++ d2i_TS_TST_INFO; ++ EVP_PKEY_asn1_add_alias; ++ d2i_TS_RESP_bio; ++ OTHERNAME_cmp; ++ GENERAL_NAME_set0_value; ++ PKCS7_RECIP_INFO_get0_alg; ++ TS_RESP_CTX_new; ++ TS_RESP_set_tst_info; ++ PKCS7_final; ++ EVP_PKEY_base_id; ++ TS_RESP_CTX_set_signer_cert; ++ TS_REQ_set_msg_imprint; ++ EVP_PKEY_CTX_ctrl; ++ TS_CONF_set_digests; ++ d2i_TS_MSG_IMPRINT; ++ EVP_PKEY_meth_set_ctrl; ++ TS_REQ_get_ext_by_NID; ++ PKCS5_pbe_set0_algor; ++ BN_BLINDING_thread_id; ++ TS_ACCURACY_new; ++ X509_CRL_METHOD_free; ++ ASN1_PCTX_get_nm_flags; ++ EVP_PKEY_meth_set_sign; ++ CRYPTO_THREADID_current; ++ EVP_PKEY_decrypt_init; ++ NETSCAPE_X509_free; ++ i2b_PVK_bio; ++ EVP_PKEY_print_private; ++ GENERAL_NAME_get0_value; ++ b2i_PVK_bio; ++ ASN1_UTCTIME_adj; ++ TS_TST_INFO_new; ++ EVP_MD_do_all_sorted; ++ TS_CONF_set_default_engine; ++ TS_ACCURACY_set_seconds; ++ TS_TST_INFO_get_time; ++ PKCS8_pkey_get0; ++ EVP_PKEY_asn1_get0; ++ OBJ_add_sigid; ++ PKCS7_SIGNER_INFO_sign; ++ EVP_PKEY_paramgen_init; ++ EVP_PKEY_sign; ++ OBJ_sigid_free; ++ EVP_PKEY_meth_set_init; ++ d2i_ESS_ISSUER_SERIAL; ++ ISSUING_DIST_POINT_new; ++ ASN1_TIME_adj; ++ TS_OBJ_print_bio; ++ EVP_PKEY_meth_set_verify_recover; ++ EVP_PKEY_meth_set_vrfy_recover; ++ TS_RESP_get_status_info; ++ CMS_stream; ++ EVP_PKEY_CTX_set_cb; ++ PKCS7_to_TS_TST_INFO; ++ ASN1_PCTX_get_oid_flags; ++ TS_TST_INFO_add_ext; ++ EVP_PKEY_meth_set_derive; ++ i2d_TS_RESP_fp; ++ i2d_TS_MSG_IMPRINT_bio; ++ TS_RESP_CTX_set_accuracy; ++ TS_REQ_set_nonce; ++ ESS_CERT_ID_new; ++ ENGINE_pkey_asn1_find_str; ++ TS_REQ_get_ext_count; ++ BUF_reverse; ++ TS_TST_INFO_print_bio; ++ d2i_ISSUING_DIST_POINT; ++ ENGINE_get_pkey_meths; ++ i2b_PrivateKey_bio; ++ i2d_TS_RESP; ++ b2i_PublicKey; ++ TS_VERIFY_CTX_cleanup; ++ TS_STATUS_INFO_free; ++ TS_RESP_verify_token; ++ OBJ_bsearch_ex_; ++ ASN1_bn_print; ++ EVP_PKEY_asn1_get_count; ++ ENGINE_register_pkey_asn1_meths; ++ ASN1_PCTX_set_nm_flags; ++ EVP_DigestVerifyInit; ++ ENGINE_set_default_pkey_meths; ++ TS_TST_INFO_get_policy_id; ++ TS_REQ_get_cert_req; ++ X509_CRL_set_meth_data; ++ PKCS8_pkey_set0; ++ ASN1_STRING_copy; ++ d2i_TS_TST_INFO_fp; ++ X509_CRL_match; ++ EVP_PKEY_asn1_set_private; ++ TS_TST_INFO_get_ext_d2i; ++ TS_RESP_CTX_add_policy; ++ d2i_TS_RESP; ++ TS_CONF_load_certs; ++ TS_TST_INFO_get_msg_imprint; ++ ERR_load_TS_strings; ++ TS_TST_INFO_get_version; ++ EVP_PKEY_CTX_dup; ++ EVP_PKEY_meth_set_verify; ++ i2b_PublicKey_bio; ++ TS_CONF_set_certs; ++ EVP_PKEY_asn1_get0_info; ++ TS_VERIFY_CTX_free; ++ TS_REQ_get_ext_by_critical; ++ TS_RESP_CTX_set_serial_cb; ++ X509_CRL_get_meth_data; ++ TS_RESP_CTX_set_time_cb; ++ TS_MSG_IMPRINT_get_msg; ++ TS_TST_INFO_ext_free; ++ TS_REQ_get_version; ++ TS_REQ_add_ext; ++ EVP_PKEY_CTX_set_app_data; ++ OBJ_bsearch_; ++ EVP_PKEY_meth_set_verifyctx; ++ i2d_PKCS7_bio_stream; ++ CRYPTO_THREADID_set_numeric; ++ PKCS7_sign_add_signer; ++ d2i_TS_TST_INFO_bio; ++ TS_TST_INFO_get_ordering; ++ TS_RESP_print_bio; ++ TS_TST_INFO_get_exts; ++ HMAC_CTX_copy; ++ PKCS5_pbe2_set_iv; ++ ENGINE_get_pkey_asn1_meths; ++ b2i_PrivateKey; ++ EVP_PKEY_CTX_get_app_data; ++ TS_REQ_set_cert_req; ++ CRYPTO_THREADID_set_callback; ++ TS_CONF_set_serial; ++ TS_TST_INFO_free; ++ d2i_TS_REQ_fp; ++ TS_RESP_verify_response; ++ i2d_ESS_ISSUER_SERIAL; ++ TS_ACCURACY_get_seconds; ++ EVP_CIPHER_do_all; ++ b2i_PrivateKey_bio; ++ OCSP_CERTID_dup; ++ X509_PUBKEY_get0_param; ++ TS_MSG_IMPRINT_dup; ++ PKCS7_print_ctx; ++ i2d_TS_REQ_bio; ++ EVP_whirlpool; ++ EVP_PKEY_asn1_set_param; ++ EVP_PKEY_meth_set_encrypt; ++ ASN1_PCTX_set_flags; ++ i2d_ESS_CERT_ID; ++ TS_VERIFY_CTX_new; ++ TS_RESP_CTX_set_extension_cb; ++ ENGINE_register_all_pkey_meths; ++ TS_RESP_CTX_set_status_info_cond; ++ TS_RESP_CTX_set_stat_info_cond; ++ EVP_PKEY_verify; ++ WHIRLPOOL_Final; ++ X509_CRL_METHOD_new; ++ EVP_DigestSignFinal; ++ TS_RESP_CTX_set_def_policy; ++ NETSCAPE_X509_it; ++ NETSCAPE_X509_it; ++ TS_RESP_create_response; ++ PKCS7_SIGNER_INFO_get0_algs; ++ TS_TST_INFO_get_nonce; ++ EVP_PKEY_decrypt_old; ++ TS_TST_INFO_set_policy_id; ++ TS_CONF_set_ess_cert_id_chain; ++ EVP_PKEY_CTX_get0_pkey; ++ d2i_TS_REQ; ++ EVP_PKEY_asn1_find_str; ++ BIO_f_asn1; ++ ESS_SIGNING_CERT_new; ++ EVP_PBE_find; ++ X509_CRL_get0_by_cert; ++ EVP_PKEY_derive; ++ i2d_TS_REQ; ++ TS_TST_INFO_delete_ext; ++ ESS_ISSUER_SERIAL_free; ++ ASN1_PCTX_set_str_flags; ++ ENGINE_get_pkey_asn1_meth_str; ++ TS_CONF_set_signer_key; ++ TS_ACCURACY_get_millis; ++ TS_RESP_get_token; ++ TS_ACCURACY_dup; ++ ENGINE_register_all_pkey_asn1_meths; ++ ENGINE_reg_all_pkey_asn1_meths; ++ X509_CRL_set_default_method; ++ CRYPTO_THREADID_hash; ++ CMS_ContentInfo_print_ctx; ++ TS_RESP_free; ++ ISSUING_DIST_POINT_free; ++ ESS_ISSUER_SERIAL_new; ++ CMS_add1_crl; ++ PKCS7_add1_attrib_digest; ++ TS_RESP_CTX_add_md; ++ TS_TST_INFO_dup; ++ ENGINE_set_pkey_asn1_meths; ++ PEM_write_bio_Parameters; ++ TS_TST_INFO_get_accuracy; ++ X509_CRL_get0_by_serial; ++ TS_TST_INFO_set_version; ++ TS_RESP_CTX_get_tst_info; ++ TS_RESP_verify_signature; ++ CRYPTO_THREADID_get_callback; ++ TS_TST_INFO_get_tsa; ++ TS_STATUS_INFO_new; ++ EVP_PKEY_CTX_get_cb; ++ TS_REQ_get_ext_d2i; ++ GENERAL_NAME_set0_othername; ++ TS_TST_INFO_get_ext_count; ++ TS_RESP_CTX_get_request; ++ i2d_NETSCAPE_X509; ++ ENGINE_get_pkey_meth_engine; ++ EVP_PKEY_meth_set_signctx; ++ EVP_PKEY_asn1_copy; ++ ASN1_TYPE_cmp; ++ EVP_CIPHER_do_all_sorted; ++ EVP_PKEY_CTX_free; ++ ISSUING_DIST_POINT_it; ++ ISSUING_DIST_POINT_it; ++ d2i_TS_MSG_IMPRINT_fp; ++ X509_STORE_get1_certs; ++ EVP_PKEY_CTX_get_operation; ++ d2i_ESS_SIGNING_CERT; ++ TS_CONF_set_ordering; ++ EVP_PBE_alg_add_type; ++ TS_REQ_set_version; ++ EVP_PKEY_get0; ++ BIO_asn1_set_suffix; ++ i2d_TS_STATUS_INFO; ++ EVP_MD_do_all; ++ TS_TST_INFO_set_accuracy; ++ PKCS7_add_attrib_content_type; ++ ERR_remove_thread_state; ++ EVP_PKEY_meth_add0; ++ TS_TST_INFO_set_tsa; ++ EVP_PKEY_meth_new; ++ WHIRLPOOL_Update; ++ TS_CONF_set_accuracy; ++ ASN1_PCTX_set_oid_flags; ++ ESS_SIGNING_CERT_dup; ++ d2i_TS_REQ_bio; ++ X509_time_adj_ex; ++ TS_RESP_CTX_add_flags; ++ d2i_TS_STATUS_INFO; ++ TS_MSG_IMPRINT_set_msg; ++ BIO_asn1_get_suffix; ++ TS_REQ_free; ++ EVP_PKEY_meth_free; ++ TS_REQ_get_exts; ++ TS_RESP_CTX_set_clock_precision_digits; ++ TS_RESP_CTX_set_clk_prec_digits; ++ TS_RESP_CTX_add_failure_info; ++ i2d_TS_RESP_bio; ++ EVP_PKEY_CTX_get0_peerkey; ++ PEM_write_bio_CMS_stream; ++ TS_REQ_new; ++ TS_MSG_IMPRINT_new; ++ EVP_PKEY_meth_find; ++ EVP_PKEY_id; ++ TS_TST_INFO_set_serial; ++ a2i_GENERAL_NAME; ++ TS_CONF_set_crypto_device; ++ EVP_PKEY_verify_init; ++ TS_CONF_set_policies; ++ ASN1_PCTX_new; ++ ESS_CERT_ID_free; ++ ENGINE_unregister_pkey_meths; ++ TS_MSG_IMPRINT_free; ++ TS_VERIFY_CTX_init; ++ PKCS7_stream; ++ TS_RESP_CTX_set_certs; ++ TS_CONF_set_def_policy; ++ ASN1_GENERALIZEDTIME_adj; ++ NETSCAPE_X509_new; ++ TS_ACCURACY_free; ++ TS_RESP_get_tst_info; ++ EVP_PKEY_derive_set_peer; ++ PEM_read_bio_Parameters; ++ TS_CONF_set_clock_precision_digits; ++ TS_CONF_set_clk_prec_digits; ++ ESS_ISSUER_SERIAL_dup; ++ TS_ACCURACY_get_micros; ++ ASN1_PCTX_get_str_flags; ++ NAME_CONSTRAINTS_check; ++ ASN1_BIT_STRING_check; ++ X509_check_akid; ++ ENGINE_unregister_pkey_asn1_meths; ++ ENGINE_unreg_pkey_asn1_meths; ++ ASN1_PCTX_free; ++ PEM_write_bio_ASN1_stream; ++ i2d_ASN1_bio_stream; ++ TS_X509_ALGOR_print_bio; ++ EVP_PKEY_meth_set_cleanup; ++ EVP_PKEY_asn1_free; ++ ESS_SIGNING_CERT_free; ++ TS_TST_INFO_set_msg_imprint; ++ GENERAL_NAME_cmp; ++ d2i_ASN1_SET_ANY; ++ ENGINE_set_pkey_meths; ++ i2d_TS_REQ_fp; ++ d2i_ASN1_SEQUENCE_ANY; ++ GENERAL_NAME_get0_otherName; ++ d2i_ESS_CERT_ID; ++ OBJ_find_sigid_algs; ++ EVP_PKEY_meth_set_keygen; ++ PKCS5_PBKDF2_HMAC; ++ EVP_PKEY_paramgen; ++ EVP_PKEY_meth_set_paramgen; ++ BIO_new_PKCS7; ++ EVP_PKEY_verify_recover; ++ TS_ext_print_bio; ++ TS_ASN1_INTEGER_print_bio; ++ check_defer; ++ DSO_pathbyaddr; ++ EVP_PKEY_set_type; ++ TS_ACCURACY_set_micros; ++ TS_REQ_to_TS_VERIFY_CTX; ++ EVP_PKEY_meth_set_copy; ++ ASN1_PCTX_set_cert_flags; ++ TS_TST_INFO_get_ext; ++ EVP_PKEY_asn1_set_ctrl; ++ TS_TST_INFO_get_ext_by_critical; ++ EVP_PKEY_CTX_new_id; ++ TS_REQ_get_ext_by_OBJ; ++ TS_CONF_set_signer_cert; ++ X509_NAME_hash_old; ++ ASN1_TIME_set_string; ++ EVP_MD_flags; ++ TS_RESP_CTX_free; ++ DSAparams_dup; ++ DHparams_dup; ++ OCSP_REQ_CTX_add1_header; ++ OCSP_REQ_CTX_set1_req; ++ X509_STORE_set_verify_cb; ++ X509_STORE_CTX_get0_current_crl; ++ X509_STORE_CTX_get0_parent_ctx; ++ X509_STORE_CTX_get0_current_issuer; ++ X509_STORE_CTX_get0_cur_issuer; ++ X509_issuer_name_hash_old; ++ X509_subject_name_hash_old; ++ EVP_CIPHER_CTX_copy; ++ UI_method_get_prompt_constructor; ++ UI_method_get_prompt_constructr; ++ UI_method_set_prompt_constructor; ++ UI_method_set_prompt_constructr; ++ EVP_read_pw_string_min; ++ CRYPTO_cts128_encrypt; ++ CRYPTO_cts128_decrypt_block; ++ CRYPTO_cfb128_1_encrypt; ++ CRYPTO_cbc128_encrypt; ++ CRYPTO_ctr128_encrypt; ++ CRYPTO_ofb128_encrypt; ++ CRYPTO_cts128_decrypt; ++ CRYPTO_cts128_encrypt_block; ++ CRYPTO_cbc128_decrypt; ++ CRYPTO_cfb128_encrypt; ++ CRYPTO_cfb128_8_encrypt; ++ ++ local: ++ *; ++}; ++ ++ ++OPENSSL_1.0.1 { ++ global: ++ SSL_renegotiate_abbreviated; ++ TLSv1_1_method; ++ TLSv1_1_client_method; ++ TLSv1_1_server_method; ++ SSL_CTX_set_srp_client_pwd_callback; ++ SSL_CTX_set_srp_client_pwd_cb; ++ SSL_get_srp_g; ++ SSL_CTX_set_srp_username_callback; ++ SSL_CTX_set_srp_un_cb; ++ SSL_get_srp_userinfo; ++ SSL_set_srp_server_param; ++ SSL_set_srp_server_param_pw; ++ SSL_get_srp_N; ++ SSL_get_srp_username; ++ SSL_CTX_set_srp_password; ++ SSL_CTX_set_srp_strength; ++ SSL_CTX_set_srp_verify_param_callback; ++ SSL_CTX_set_srp_vfy_param_cb; ++ SSL_CTX_set_srp_cb_arg; ++ SSL_CTX_set_srp_username; ++ SSL_CTX_SRP_CTX_init; ++ SSL_SRP_CTX_init; ++ SRP_Calc_A_param; ++ SRP_generate_server_master_secret; ++ SRP_gen_server_master_secret; ++ SSL_CTX_SRP_CTX_free; ++ SRP_generate_client_master_secret; ++ SRP_gen_client_master_secret; ++ SSL_srp_server_param_with_username; ++ SSL_srp_server_param_with_un; ++ SSL_SRP_CTX_free; ++ SSL_set_debug; ++ SSL_SESSION_get0_peer; ++ TLSv1_2_client_method; ++ SSL_SESSION_set1_id_context; ++ TLSv1_2_server_method; ++ SSL_cache_hit; ++ SSL_get0_kssl_ctx; ++ SSL_set0_kssl_ctx; ++ SSL_set_state; ++ SSL_CIPHER_get_id; ++ TLSv1_2_method; ++ kssl_ctx_get0_client_princ; ++ SSL_export_keying_material; ++ SSL_set_tlsext_use_srtp; ++ SSL_CTX_set_next_protos_advertised_cb; ++ SSL_CTX_set_next_protos_adv_cb; ++ SSL_get0_next_proto_negotiated; ++ SSL_get_selected_srtp_profile; ++ SSL_CTX_set_tlsext_use_srtp; ++ SSL_select_next_proto; ++ SSL_get_srtp_profiles; ++ SSL_CTX_set_next_proto_select_cb; ++ SSL_CTX_set_next_proto_sel_cb; ++ SSL_SESSION_get_compress_id; ++ ++ SRP_VBASE_get_by_user; ++ SRP_Calc_server_key; ++ SRP_create_verifier; ++ SRP_create_verifier_BN; ++ SRP_Calc_u; ++ SRP_VBASE_free; ++ SRP_Calc_client_key; ++ SRP_get_default_gN; ++ SRP_Calc_x; ++ SRP_Calc_B; ++ SRP_VBASE_new; ++ SRP_check_known_gN_param; ++ SRP_Calc_A; ++ SRP_Verify_A_mod_N; ++ SRP_VBASE_init; ++ SRP_Verify_B_mod_N; ++ EC_KEY_set_public_key_affine_coordinates; ++ EC_KEY_set_pub_key_aff_coords; ++ EVP_aes_192_ctr; ++ EVP_PKEY_meth_get0_info; ++ EVP_PKEY_meth_copy; ++ ERR_add_error_vdata; ++ EVP_aes_128_ctr; ++ EVP_aes_256_ctr; ++ EC_GFp_nistp224_method; ++ EC_KEY_get_flags; ++ RSA_padding_add_PKCS1_PSS_mgf1; ++ EVP_aes_128_xts; ++ EVP_aes_256_xts; ++ EVP_aes_128_gcm; ++ EC_KEY_clear_flags; ++ EC_KEY_set_flags; ++ EVP_aes_256_ccm; ++ RSA_verify_PKCS1_PSS_mgf1; ++ EVP_aes_128_ccm; ++ EVP_aes_192_gcm; ++ X509_ALGOR_set_md; ++ RAND_init_fips; ++ EVP_aes_256_gcm; ++ EVP_aes_192_ccm; ++ CMAC_CTX_copy; ++ CMAC_CTX_free; ++ CMAC_CTX_get0_cipher_ctx; ++ CMAC_CTX_cleanup; ++ CMAC_Init; ++ CMAC_Update; ++ CMAC_resume; ++ CMAC_CTX_new; ++ CMAC_Final; ++ CRYPTO_ctr128_encrypt_ctr32; ++ CRYPTO_gcm128_release; ++ CRYPTO_ccm128_decrypt_ccm64; ++ CRYPTO_ccm128_encrypt; ++ CRYPTO_gcm128_encrypt; ++ CRYPTO_xts128_encrypt; ++ EVP_rc4_hmac_md5; ++ CRYPTO_nistcts128_decrypt_block; ++ CRYPTO_gcm128_setiv; ++ CRYPTO_nistcts128_encrypt; ++ EVP_aes_128_cbc_hmac_sha1; ++ CRYPTO_gcm128_tag; ++ CRYPTO_ccm128_encrypt_ccm64; ++ ENGINE_load_rdrand; ++ CRYPTO_ccm128_setiv; ++ CRYPTO_nistcts128_encrypt_block; ++ CRYPTO_gcm128_aad; ++ CRYPTO_ccm128_init; ++ CRYPTO_nistcts128_decrypt; ++ CRYPTO_gcm128_new; ++ CRYPTO_ccm128_tag; ++ CRYPTO_ccm128_decrypt; ++ CRYPTO_ccm128_aad; ++ CRYPTO_gcm128_init; ++ CRYPTO_gcm128_decrypt; ++ ENGINE_load_rsax; ++ CRYPTO_gcm128_decrypt_ctr32; ++ CRYPTO_gcm128_encrypt_ctr32; ++ CRYPTO_gcm128_finish; ++ EVP_aes_256_cbc_hmac_sha1; ++ PKCS5_pbkdf2_set; ++ CMS_add0_recipient_password; ++ CMS_decrypt_set1_password; ++ CMS_RecipientInfo_set0_password; ++ RAND_set_fips_drbg_type; ++ X509_REQ_sign_ctx; ++ RSA_PSS_PARAMS_new; ++ X509_CRL_sign_ctx; ++ X509_signature_dump; ++ d2i_RSA_PSS_PARAMS; ++ RSA_PSS_PARAMS_it; ++ RSA_PSS_PARAMS_it; ++ RSA_PSS_PARAMS_free; ++ X509_sign_ctx; ++ i2d_RSA_PSS_PARAMS; ++ ASN1_item_sign_ctx; ++ EC_GFp_nistp521_method; ++ EC_GFp_nistp256_method; ++ OPENSSL_stderr; ++ OPENSSL_cpuid_setup; ++ OPENSSL_showfatal; ++ BIO_new_dgram_sctp; ++ BIO_dgram_sctp_msg_waiting; ++ BIO_dgram_sctp_wait_for_dry; ++ BIO_s_datagram_sctp; ++ BIO_dgram_is_sctp; ++ BIO_dgram_sctp_notification_cb; ++} OPENSSL_1.0.0; ++ ++OPENSSL_1.0.1d { ++ global: ++ CRYPTO_memcmp; ++} OPENSSL_1.0.1; ++ +-- +1.7.9.5 + diff --git a/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl_qat-build-qat_mem-ko-against-yocto-kernel.patch b/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl_qat-build-qat_mem-ko-against-yocto-kernel.patch new file mode 100644 index 00000000..7c43b569 --- /dev/null +++ b/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl_qat-build-qat_mem-ko-against-yocto-kernel.patch @@ -0,0 +1,62 @@ +From 3927de1c19b48a031b27b2635928cd6f9650d02e Mon Sep 17 00:00:00 2001 +From: Anuj Mittal <anujx.mittal@intel.com> +Date: Wed, 8 Jul 2015 17:49:09 +0800 +Subject: [PATCH] openssl-qat: build qat_mem ko against yocto kernel + +Upstream-Status: Inappropriate [Configuration] + +Signed-off-by: Anuj Mittal <anujx.mittal@intel.com> +--- + engines/qat_engine/qat_mem/Makefile | 23 +++++++---------------- + 1 file changed, 7 insertions(+), 16 deletions(-) + +diff --git a/engines/qat_engine/qat_mem/Makefile b/engines/qat_engine/qat_mem/Makefile +index 3d9a19f..4369503 100644 +--- a/engines/qat_engine/qat_mem/Makefile ++++ b/engines/qat_engine/qat_mem/Makefile +@@ -9,23 +9,10 @@ + MODULENAME := qat_mem + ### should not need to change stuff below ###################### + +- +-KDIR := /lib/modules/$(shell uname -r)/build +-#KDIR := /exports/linux-2.6.12.2/ ++KDIR := $(KERNEL_SOURCE_ROOT) + PWD := $(shell pwd) + +-ifeq ($(shell uname -r|grep -c grsec-WR), 1) +-AUTO_CONF=/lib/modules/$(shell uname -r)/build/include/generated/autoconf.h +-else +-AUTO_CONF=/usr/src/kernels/$(shell uname -r)/include/linux/autoconf.h +-endif +- +-ifdef KERNEL_SOURCE_ROOT +-AUTO_CONF=$(KERNEL_SOURCE_ROOT)/include/linux/autoconf.h +-KDIR=$(KERNEL_SOURCE_ROOT) +-endif +- +-CC := gcc -Wall -imacros $(AUTO_CONF) ++CC := ${CC} -Wall -imacros $(KERNEL_BUILDDIR)/include/generated/autoconf.h + + ifeq ($(KERNELRELEASE),) + all: $(MODULENAME)_test +@@ -38,6 +25,11 @@ endif + $(MODULENAME)_test: $(MODULENAME)_test.c + $(CC) -g -o $(MODULENAME)_test $(MODULENAME)_test.c + ++install: modules_install ++ cp $(MODULENAME)_test $(DESTDIR) ++ ++modules_install: ++ $(MAKE) -C $(KDIR) M=$(PWD) modules_install + + load: + insmod ./$(MODULENAME).ko +@@ -50,4 +42,3 @@ test: all + + clean: + rm -f *.o *.ko Modules.symvers *.mod.c .*.cmd $(MODULENAME)_test +- +-- +1.7.9.5 + diff --git a/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl_qat-environment-variables-to-have-precedence.patch b/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl_qat-environment-variables-to-have-precedence.patch new file mode 100644 index 00000000..82c9965d --- /dev/null +++ b/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl_qat-environment-variables-to-have-precedence.patch @@ -0,0 +1,59 @@ +From dde5f7d6603d875b1d871498ae95a6837ccd591d Mon Sep 17 00:00:00 2001 +From: Anuj Mittal <anujx.mittal@intel.com> +Date: Sat, 20 Jun 2015 00:25:27 +0800 +Subject: [PATCH] openssl_qat: environment variables to have precedence + +Upstream-Status: Inappropriate [configuration] + +(From meta/recipes-connectivity/openssl/openssl/shared-libs.patch + rev: 5dd1d7566964c90d33c0c44f569d9336fb0724ce) + +Signed-off-by: Anuj Mittal <anujx.mittal@intel.com> +--- + Makefile.org | 2 +- + crypto/Makefile | 2 +- + ssl/Makefile | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/Makefile.org b/Makefile.org +index 1f2f5e1..679c884 100644 +--- a/Makefile.org ++++ b/Makefile.org +@@ -311,7 +311,7 @@ libcrypto$(SHLIB_EXT): libcrypto.a fips_premain_dso$(EXE_EXT) + + libssl$(SHLIB_EXT): libcrypto$(SHLIB_EXT) libssl.a + @if [ "$(SHLIB_TARGET)" != "" ]; then \ +- $(MAKE) SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \ ++ $(MAKE) -e SHLIBDIRS=ssl SHLIBDEPS='-lcrypto' build-shared; \ + else \ + echo "There's no support for shared libraries on this platform" >&2; \ + exit 1; \ +diff --git a/crypto/Makefile b/crypto/Makefile +index 2355661..1b0c324 100644 +--- a/crypto/Makefile ++++ b/crypto/Makefile +@@ -107,7 +107,7 @@ $(LIB): $(LIBOBJ) + + shared: buildinf.h lib subdirs + if [ -n "$(SHARED_LIBS)" ]; then \ +- (cd ..; $(MAKE) $(SHARED_LIB)); \ ++ (cd ..; $(MAKE) -e $(SHARED_LIB)); \ + fi + + libs: +diff --git a/ssl/Makefile b/ssl/Makefile +index e05ada2..6f51862 100644 +--- a/ssl/Makefile ++++ b/ssl/Makefile +@@ -64,7 +64,7 @@ lib: $(LIBOBJ) + + shared: lib + if [ -n "$(SHARED_LIBS)" ]; then \ +- (cd ..; $(MAKE) $(SHARED_LIB)); \ ++ (cd ..; $(MAKE) -e $(SHARED_LIB)); \ + fi + + files: +-- +1.7.9.5 + diff --git a/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl_qat-install-engines-in-libdir-ssl.patch b/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl_qat-install-engines-in-libdir-ssl.patch new file mode 100644 index 00000000..a5eea339 --- /dev/null +++ b/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl_qat-install-engines-in-libdir-ssl.patch @@ -0,0 +1,72 @@ +From 9ca66b344a9e9cb3345281496793a74ef01c548f Mon Sep 17 00:00:00 2001 +From: Anuj Mittal <anujx.mittal@intel.com> +Date: Sat, 20 Jun 2015 00:28:55 +0800 +Subject: [PATCH] openssl_qat: install engines in ${libdir}/ssl + +Upstream-Status: Inappropriate [configuration] + +(Taken from meta/recipes-connectivity/openssl/openssl + rev: 5dd1d7566964c90d33c0c44f569d9336fb0724ce) + +Signed-off-by: Anuj Mittal <anujx.mittal@intel.com> +--- + engines/Makefile | 10 +++++----- + engines/ccgost/Makefile | 8 ++++---- + 2 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/engines/Makefile b/engines/Makefile +index 5240c07..721f1e0 100644 +--- a/engines/Makefile ++++ b/engines/Makefile +@@ -108,7 +108,7 @@ install: + @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile... + @if [ -n "$(SHARED_LIBS)" ]; then \ + set -e; \ +- $(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines; \ ++ $(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines; \ + for l in $(LIBNAMES); do \ + ( echo installing $$l; \ + pfx=lib; \ +@@ -120,13 +120,13 @@ install: + *DSO_WIN32*) sfx="eay32.dll"; pfx=;; \ + *) sfx=".bad";; \ + esac; \ +- cp $$pfx$$l$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \ ++ cp $$pfx$$l$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$$pfx$$l$$sfx.new; \ + else \ + sfx=".so"; \ +- cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \ ++ cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$$pfx$$l$$sfx.new; \ + fi; \ +- chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new; \ +- mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx ); \ ++ chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$$pfx$$l$$sfx.new; \ ++ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$$pfx$$l$$sfx ); \ + done; \ + fi + @target=install; $(RECURSIVE_MAKE) +diff --git a/engines/ccgost/Makefile b/engines/ccgost/Makefile +index d661c10..e137b37 100644 +--- a/engines/ccgost/Makefile ++++ b/engines/ccgost/Makefile +@@ -53,13 +53,13 @@ install: + *DSO_WIN32*) sfx="eay32.dll"; pfx=;; \ + *) sfx=".bad";; \ + esac; \ +- cp $${pfx}$(LIBNAME)$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \ ++ cp $${pfx}$(LIBNAME)$$sfx $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$${pfx}$(LIBNAME)$$sfx.new; \ + else \ + sfx=".so"; \ +- cp cyg$(LIBNAME).dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \ ++ cp cyg$(LIBNAME).dll $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$${pfx}$(LIBNAME)$$sfx.new; \ + fi; \ +- chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new; \ +- mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$${pfx}$(LIBNAME)$$sfx; \ ++ chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$${pfx}$(LIBNAME)$$sfx.new; \ ++ mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$${pfx}$(LIBNAME)$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/ssl/engines/$${pfx}$(LIBNAME)$$sfx; \ + fi + + links: +-- +1.7.9.5 + diff --git a/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl_qat-pass-oe_ldflags-to-linker.patch b/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl_qat-pass-oe_ldflags-to-linker.patch new file mode 100644 index 00000000..59a54ce9 --- /dev/null +++ b/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl_qat-pass-oe_ldflags-to-linker.patch @@ -0,0 +1,40 @@ +From accc6c251cafdb3332db946d543952e2cf0698cd Mon Sep 17 00:00:00 2001 +From: Anuj Mittal <anujx.mittal@intel.com> +Date: Sat, 20 Jun 2015 00:31:31 +0800 +Subject: [PATCH] openssl_qat: pass oe_ldflags to linker + +Upstream-Status: Inappropriate [open-embedded] + +(Taken from meta/recipes-connectivity/openssl/openssl/oe-ldflags.patch + rev: 5dd1d7566964c90d33c0c44f569d9336fb0724ce) + +Signed-off-by: Anuj Mittal <anujx.mittal@intel.com> +--- + Makefile.shared | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile.shared b/Makefile.shared +index e753f44..fcdcb9e 100644 +--- a/Makefile.shared ++++ b/Makefile.shared +@@ -92,7 +92,7 @@ CALC_VERSIONS= \ + LINK_APP= \ + ( $(SET_X); \ + LIBDEPS="$${LIBDEPS:-$(LIBDEPS)}"; \ +- LDCMD="$${LDCMD:-$(CC)}"; LDFLAGS="$${LDFLAGS:-$(CFLAGS)}"; \ ++ LDCMD="$${LDCMD:-$(CC)}"; LDFLAGS="$(OE_LDFLAGS) $${LDFLAGS:-$(CFLAGS)}"; \ + LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \ + LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \ + LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \ +@@ -102,7 +102,7 @@ LINK_SO= \ + ( $(SET_X); \ + LIBDEPS="$${LIBDEPS:-$(LIBDEPS)}"; \ + SHAREDCMD="$${SHAREDCMD:-$(CC)}"; \ +- SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \ ++ SHAREDFLAGS="$(OE_LDFLAGS) $${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \ + LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \ + LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \ + LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \ +-- +1.7.9.5 + diff --git a/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl_qat-remove-redundant-rpaths.patch b/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl_qat-remove-redundant-rpaths.patch new file mode 100644 index 00000000..06d706fd --- /dev/null +++ b/meta-qat/recipes-extended/openssl-qat/openssl-qat/openssl_qat-remove-redundant-rpaths.patch @@ -0,0 +1,31 @@ +From ed93d22846a1859ba3ab4584a1358b9325bf2e93 Mon Sep 17 00:00:00 2001 +From: Anuj Mittal <anujx.mittal@intel.com> +Date: Tue, 23 Jun 2015 13:59:52 +0800 +Subject: [PATCH] openssl_qat: remove redundant rpaths + +Upstream-Status: Inappropriate [Configuration] + +This is not required and introduces bad rpath errors when +building with bitbake. + +Signed-off-by: Anuj Mittal <anujx.mittal@intel.com> +--- + engines/qat_engine/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/engines/qat_engine/Makefile b/engines/qat_engine/Makefile +index 02cfd15..e96e66a 100644 +--- a/engines/qat_engine/Makefile ++++ b/engines/qat_engine/Makefile +@@ -99,7 +99,7 @@ endif + SRC=$(QATLIBSRC) + QATLIBTARGET=$(TOP)/libcrypto.a + ifdef ICP_BUILD_OUTPUT +-QATSHAREDLIBDEPS=-Wl,-rpath,$(ICP_BUILD_OUTPUT) -L$(ICP_BUILD_OUTPUT) -l$(DRIVER)_s ++QATSHAREDLIBDEPS=-L$(ICP_BUILD_OUTPUT) -l$(DRIVER)_s + else + QATSHAREDLIBDEPS=-l$(DRIVER)_s + endif +-- +1.7.9.5 + diff --git a/meta-qat/recipes-extended/openssl-qat/openssl-qat_0.4.9-009.bb b/meta-qat/recipes-extended/openssl-qat/openssl-qat_0.4.9-009.bb new file mode 100644 index 00000000..e3d8ccc0 --- /dev/null +++ b/meta-qat/recipes-extended/openssl-qat/openssl-qat_0.4.9-009.bb @@ -0,0 +1,14 @@ +include openssl-qat.inc + +OPENSSL_VERSION = "1.0.1async" + +SRC_URI += "git://opensslfoundation.com/openssl-async.git;branch=OpenSSL_1_0_1-async;rev=asynch_v0.4.9-009 \ + file://openssl-qat_0.4.9-009-openssl_qat-add-version-script.patch \ + file://openssl-qat_0.4.9-009-openssl_qat-add-openssl-async-specific-symbols.patch \ + " + +SRC_URI_append_libc-musl = " file://0001-Use_sched_yield_api.patch" + +SRC_URI[openssl_qat.md5sum]="8e2b45cf9b345356bdff0956845c6103" +SRC_URI[openssl_qat.sha256sum]="c2334b4d1fc8498e06f0554ef155041a6bf441de134cfdd3635e5a449a34bf81" + diff --git a/meta-qat/recipes-extended/qat/qat16.inc b/meta-qat/recipes-extended/qat/qat16.inc new file mode 100644 index 00000000..ad117ba1 --- /dev/null +++ b/meta-qat/recipes-extended/qat/qat16.inc @@ -0,0 +1,123 @@ +DESCRIPTION = "Intel(r) QuickAssist Technology API" +HOMEPAGE = "https://01.org/packet-processing/intel%C2%AE-quickassist-technology-drivers-and-patches" + +#Dual BSD and GPLv2 License +LICENSE = "BSD & GPLv2" +LIC_FILES_CHKSUM = "\ + file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 \ + file://${COMMON_LICENSE_DIR}/BSD;md5=3775480a712fc46a69647678acb234cb \ + " + +DEPENDS += "zlib openssl" +PROVIDES += "virtual/qat" + +SRC_URI="file://qat16_2.3.0-34-qat-fix-for-cross-compilation-issue.patch \ + file://qat16_2.3.0-34-qat-remove-local-path-from-makefile.patch \ + file://qat16_2.3.0-34-make-sure-CFLAGS-are-correct.patch \ + file://qat16_2.5.0-80-qat-change-in-return-type-of-func-in-kernel-v4.4.patch \ + file://qat16_2.5.0-80-qat-Added-include-dir-path.patch \ + " + +COMPATIBLE_MACHINE = "null" +COMPATIBLE_HOST_linux-gnux32 = "null" + +S = "${WORKDIR}/${ICP_DRIVER_TYPE}" +ICP_TOOLS = "accelcomp" +SAMPLE_CODE_DIR = "${S}/quickassist/lookaside/access_layer/src/sample_code" +TARGET_CC_ARCH += "$(LDFLAGS)" + +export ICP_DRIVER_TYPE = "QAT1.6" +export ICP_FIRMWARE_DIR="dh895xcc" +export ICP_ROOT = "${S}" +export ICP_ENV_DIR = "${S}/quickassist/build_system/build_files/env_files" +export ICP_BUILDSYSTEM_PATH = "${S}/quickassist/build_system" +export ICP_TOOLS_TARGET = "${ICP_TOOLS}" +export FUNC_PATH = "${ICP_ROOT}/quickassist/lookaside/access_layer/src/sample_code/functional" +export KERNEL_SOURCE_ROOT = "${STAGING_KERNEL_DIR}" +export ICP_BUILD_OUTPUT = "${D}" +export DEST_LIBDIR = "${libdir}" +export DEST_BINDIR = "${bindir}" +export QAT_KERNEL_VER = "${KERNEL_VERSION}" +export SAMPLE_BUILD_OUTPUT = "${D}" +export MODULE_DIR = "${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers" + +inherit module +inherit update-rc.d +INITSCRIPT_NAME = "qat_service" + +PARALLEL_MAKE = "" + +#To get around the double slashes in paths in QAT makefiles +PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src" + +EXTRA_OEMAKE_append = " CFLAGS+='-fgnu89-inline -fPIC'" +EXTRA_OEMAKE = "-e MAKEFLAGS=" +do_unpack2() { + cd ${S}/ + tar xzvf ${ICP_DRIVER_TYPE}.L.${PV}.tar.gz +} + +addtask unpack2 after do_unpack before do_patch + +do_compile () { + export LD="${CC} -Wl,--hash-style=gnu -nostartfiles -nodefaultlibs" + export MACHINE="${TARGET_ARCH}" + cd ${S}/quickassist + oe_runmake + + cd ${SAMPLE_CODE_DIR} + touch ${SAMPLE_CODE_DIR}/performance/compression/calgary + touch ${SAMPLE_CODE_DIR}/performance/compression/canterbury + + #build the whole sample code: fips, functional, performance + oe_runmake 'all' + oe_runmake 'fips_user_code' +} + +do_install() { + export MACHINE="${TARGET_ARCH}" + cd ${S}/quickassist + oe_runmake install + + cd ${SAMPLE_CODE_DIR} + oe_runmake install + + install -d ${D}/etc/udev/rules.d \ + ${D}${includedir} \ + ${D}${includedir}/dc \ + ${D}${includedir}/lac \ + ${D}${sysconfdir}/dh895xcc \ + ${D}${base_libdir}/firmware + + echo 'KERNEL=="icp_adf_ctl" MODE="0600"' > ${D}/etc/udev/rules.d/00-dh895xcc_qa.rules + echo 'KERNEL=="icp_dev[0-9]*" MODE="0600"' >> ${D}/etc/udev/rules.d/00-dh895xcc_qa.rules + echo 'KERNEL=="icp_dev_mem?" MODE="0600"' >> ${D}/etc/udev/rules.d/00-dh895xcc_qa.rules + + install -m 640 ${S}/quickassist/include/*.h ${D}${includedir} + install -m 640 ${S}/quickassist/include/dc/*.h ${D}${includedir}/dc/ + install -m 640 ${S}/quickassist/include/lac/*.h ${D}${includedir}/lac/ + install -m 640 ${S}/quickassist/lookaside/access_layer/include/*.h ${D}${includedir} + + install -m 0755 ${SAMPLE_CODE_DIR}/performance/compression/calgary ${D}${base_libdir}/firmware + install -m 0755 ${SAMPLE_CODE_DIR}/performance/compression/canterbury ${D}${base_libdir}/firmware + + install -m 660 ${S}/quickassist/config/dh* ${D}${sysconfdir}/dh895xcc +} + +PACKAGES += "${PN}-app" + +FILES_${PN}-dev = "${includedir}" + +FILES_${PN} += "\ + ${base_libdir}/firmware/ \ + ${sysconfdir}/ \ + ${sysconfdir}/udev/rules.d/ \ + ${sysconfdir}/init.d/ \ + ${libdir}/ \ + " + +FILES_${PN}-dbg += "${sysconfdir}/init.d/.debug" + +FILES_${PN}-app += "${bindir}/*" + +EXCLUDE_FROM_WORLD_core2-32-intel-common = "1" diff --git a/meta-qat/recipes-extended/qat/qat16/0001-OsalServices-Only-use-bits-time-with-GLIBC.patch b/meta-qat/recipes-extended/qat/qat16/0001-OsalServices-Only-use-bits-time-with-GLIBC.patch new file mode 100644 index 00000000..d627353d --- /dev/null +++ b/meta-qat/recipes-extended/qat/qat16/0001-OsalServices-Only-use-bits-time-with-GLIBC.patch @@ -0,0 +1,27 @@ +From f83ac703a6babfa7f177b8f14ff3263a08fd8871 Mon Sep 17 00:00:00 2001 +From: Saul Wold <sgw@linux.intel.com> +Date: Thu, 9 Feb 2017 14:35:57 -0800 +Subject: [PATCH] OsalServices: Only use bits/time with GLIBC + +Upstream-Status: Pending +Signed-off-by: Saul Wold <sgw@linux.intel.com> +--- + quickassist/utilities/osal/src/linux/user_space/OsalServices.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/quickassist/utilities/osal/src/linux/user_space/OsalServices.c b/quickassist/utilities/osal/src/linux/user_space/OsalServices.c +index 49fde45..5f50aaa 100755 +--- a/quickassist/utilities/osal/src/linux/user_space/OsalServices.c ++++ b/quickassist/utilities/osal/src/linux/user_space/OsalServices.c +@@ -41,7 +41,7 @@ + + #include <stdarg.h> + #include <stdio.h> +-#ifdef __linux__ ++#if defined(__linux__) && defined(__GLIBC__) + #include <bits/time.h> + #endif + #include <sched.h> +-- +2.7.4 + diff --git a/meta-qat/recipes-extended/qat/qat16/qat16_2.3.0-34-make-sure-CFLAGS-are-correct.patch b/meta-qat/recipes-extended/qat/qat16/qat16_2.3.0-34-make-sure-CFLAGS-are-correct.patch new file mode 100644 index 00000000..e1ed3fc9 --- /dev/null +++ b/meta-qat/recipes-extended/qat/qat16/qat16_2.3.0-34-make-sure-CFLAGS-are-correct.patch @@ -0,0 +1,30 @@ +From 83f465ee776868875f6c19c2110eed4db6c547ce Mon Sep 17 00:00:00 2001 +From: Anuj Mittal <anujx.mittal@intel.com> +Date: Thu, 10 Sep 2015 11:58:44 +0800 +Subject: [PATCH] qat: make sure CFLAGS are correct + +Upstream-Status: Submitted + +Ensure that all the CFLAGS values are being considered. + +Signed-off-by: Anuj Mittal <anujx.mittal@intel.com> +--- + quickassist/adf/user/user_proxy/src/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/quickassist/adf/user/user_proxy/src/Makefile b/quickassist/adf/user/user_proxy/src/Makefile +index 868313a..efd352c 100644 +--- a/quickassist/adf/user/user_proxy/src/Makefile ++++ b/quickassist/adf/user/user_proxy/src/Makefile +@@ -133,7 +133,7 @@ INCLUDES+= -I$(ADF_DIR)/include \ + -I$(ADF_PLATFORM_DIR)/include \ + -I$(ADF_CTL_DIR)/include + +-CFLAGS = -D_GNU_SOURCE -O2 $(INCLUDES) ++CFLAGS += -D_GNU_SOURCE -O2 $(INCLUDES) + #needed by SAL + EXTRA_CFLAGS += -fPIC -fno-strict-aliasing + #include your $(ICP_OS)_$(ICP_OS_LEVEL).mk file +-- +1.7.9.5 + diff --git a/meta-qat/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-fix-for-cross-compilation-issue.patch b/meta-qat/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-fix-for-cross-compilation-issue.patch new file mode 100644 index 00000000..b7b77d05 --- /dev/null +++ b/meta-qat/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-fix-for-cross-compilation-issue.patch @@ -0,0 +1,40 @@ +From 340701a0f44e70eafd9029e9186b74e8783f2afd Mon Sep 17 00:00:00 2001 +From: venkatasubramanian pattu <venkatasubramanianx.pattu@intel.com> +Date: Mon, 6 Jul 2015 15:57:20 +0800 +Subject: [PATCH] qat: fix for cross-compilation issue + +Upstream-Status: Inappropriate [Configuration] + +Ensure that we are not using host compiler. + +Signed-off-by: venkatasubramanian pattu <venkatasubramanianx.pattu@intel.com> +Signed-off-by: Anuj Mittal <anujx.mittal@intel.com> +--- + .../dc/stateless_multi_op_checksum_sample/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/quickassist/lookaside/access_layer/src/sample_code/functional/dc/stateless_multi_op_checksum_sample/Makefile b/quickassist/lookaside/access_layer/src/sample_code/functional/dc/stateless_multi_op_checksum_sample/Makefile +index 01590c3..315fca7 100644 +--- a/quickassist/lookaside/access_layer/src/sample_code/functional/dc/stateless_multi_op_checksum_sample/Makefile ++++ b/quickassist/lookaside/access_layer/src/sample_code/functional/dc/stateless_multi_op_checksum_sample/Makefile +@@ -111,7 +111,7 @@ else + ADDITIONAL_OBJECTS += $(ICP_BUILD_OUTPUT)/libicp_qa_al_s.so + endif + +-ADDITIONAL_OBJECTS += -L/usr/Lib -lpthread -lcrypto ++ADDITIONAL_OBJECTS += -lpthread -lcrypto + + USER_SOURCE_FILES = ../../common/cpa_sample_utils.c cpa_dc_stateless_multi_op_checksum_sample.c + USER_SOURCE_FILES += ../stateless_sample/cpa_dc_sample_user.c +@@ -127,7 +127,7 @@ else + endif + + default: clean +- gcc -Wall -O1 $(USER_INCLUDES) -DUSER_SPACE $(EXTRA_CFLAGS) \ ++ $(CC) -Wall -O1 $(USER_INCLUDES) -DUSER_SPACE $(EXTRA_CFLAGS) \ + $(USER_SOURCE_FILES) $(ADDITIONAL_OBJECTS) -o $(OUTPUT_NAME) + + clean: +-- +1.7.9.5 + diff --git a/meta-qat/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-remove-local-path-from-makefile.patch b/meta-qat/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-remove-local-path-from-makefile.patch new file mode 100644 index 00000000..0021c0d7 --- /dev/null +++ b/meta-qat/recipes-extended/qat/qat16/qat16_2.3.0-34-qat-remove-local-path-from-makefile.patch @@ -0,0 +1,31 @@ +From 5044a14a6b4192b771f16aa834f688c1fd1287dd Mon Sep 17 00:00:00 2001 +From: Anuj Mittal <anujx.mittal@intel.com> +Date: Wed, 8 Jul 2015 11:11:32 +0800 +Subject: [PATCH] qat: remove local path from makefile + +Upstream-Status: Inappropriate [Configuration] + +Remove the host machine /usr/include path from makefile. + +Signed-off-by: Anuj Mittal <anujx.mittal@intel.com> +--- + .../build_files/env_files/linux_2.6_user_space.mk | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk b/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk +index 1451f4a..719d1bb 100755 +--- a/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk ++++ b/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk +@@ -72,8 +72,7 @@ + # + #------------------------------------------------------------- + +-INCLUDES+=-I/usr/include \ +- -I$(API_DIR) \ ++INCLUDES+=-I$(API_DIR) \ + -I$(OSAL_DIR)/include \ + -I$(OSAL_DIR)/src/linux/user_space/include + +-- +1.7.9.5 + diff --git a/meta-qat/recipes-extended/qat/qat16/qat16_2.5.0-80-qat-Added-include-dir-path.patch b/meta-qat/recipes-extended/qat/qat16/qat16_2.5.0-80-qat-Added-include-dir-path.patch new file mode 100644 index 00000000..a5389306 --- /dev/null +++ b/meta-qat/recipes-extended/qat/qat16/qat16_2.5.0-80-qat-Added-include-dir-path.patch @@ -0,0 +1,30 @@ +From 142bf81912701d94985ad656c2250650113d00de Mon Sep 17 00:00:00 2001 +From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> +Date: Tue, 22 Mar 2016 01:44:09 +0800 +Subject: [PATCH 2/2] qat: Added include dir path + +Upstream-Status: Inappropriate [Configuration] + +Make sure that we point to the correct include path to the local +headers. + +Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> +--- + quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk b/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk +index b504f7f..a75f152 100755 +--- a/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk ++++ b/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk +@@ -84,6 +84,7 @@ INCLUDES+=-I$(API_DIR) \ + + EXTRA_CFLAGS += $(cmd_line_cflags) + EXTRA_CFLAGS += -fno-strict-aliasing ++EXTRA_CFLAGS += $(INCLUDES) + EXTRA_LDFLAGS +=-whole-archive + + ifeq ($(ARCH), i386) +-- +1.9.1 + diff --git a/meta-qat/recipes-extended/qat/qat16/qat16_2.5.0-80-qat-add-install-target-to-makefiles.patch b/meta-qat/recipes-extended/qat/qat16/qat16_2.5.0-80-qat-add-install-target-to-makefiles.patch new file mode 100644 index 00000000..927389ff --- /dev/null +++ b/meta-qat/recipes-extended/qat/qat16/qat16_2.5.0-80-qat-add-install-target-to-makefiles.patch @@ -0,0 +1,387 @@ +From 803fd66d6a7e6dccc420f925106da0f05766a2f6 Mon Sep 17 00:00:00 2001 +From: Anuj Mittal <anujx.mittal@intel.com> +Date: Wed, 9 Sep 2015 16:58:55 +0800 +Subject: [PATCH] qat: add-install-target-to-makefiles + +Upstream-Status: Inappropriate [Configuration] + +Add install target to makefile to help install +ingredients at the proper location. + +Signed-off-by: Anuj Mittal <anujx.mittal@intel.com> +--- + quickassist/Makefile | 36 ++++++---- + .../access_layer/src/sample_code/Makefile | 18 +++-- + .../src/sample_code/functional/Makefile | 73 +++++++++++--------- + 3 files changed, 73 insertions(+), 54 deletions(-) + +diff --git a/quickassist/Makefile b/quickassist/Makefile +index 339d410..b23a409 100644 +--- a/quickassist/Makefile ++++ b/quickassist/Makefile +@@ -108,7 +108,7 @@ export DRBG_POLL_AND_WAIT=1 + ifdef WITH_CPA_MUX + ALL_TARGETS = clean lac_lib_dir libosal libosal_user qat_mux hal adf adf_user lac lac_user qat-fw install_scripts + else +-ALL_TARGETS = clean lac_lib_dir libosal libosal_user hal adf adf_user lac lac_user qat-fw install_scripts ++ALL_TARGETS = clean lac_lib_dir libosal libosal_user hal adf adf_user lac lac_user + endif + ICP_ARCH_USER?=`uname -m` + +@@ -120,7 +120,16 @@ all: $(ALL_TARGETS) + @echo 'Build Done'; + + user: lac_lib_dir libosal_user adf_user lac_user +-kernel: lac_lib_dir libosal hal adf lac qat-fw install_scripts ++kernel: lac_lib_dir libosal hal adf lac qat-fw ++ ++install: qat-fw install_scripts ++ @cp $(OSAL_PATH)/src/build/linux_2.6/user_space/libosal.a $(ICP_BUILD_OUTPUT)/$(DEST_LIBDIR); ++ @cp $(OSAL_PATH)/src/build/linux_2.6/user_space/libosal.a $(ICP_BUILD_OUTPUT)/$(DEST_LIBDIR); ++ @cp $(ADF_PATH)/build/linux_2.6/libadf_proxy.a $(ICP_BUILD_OUTPUT)/$(DEST_LIBDIR); ++ @cp $(ADF_PATH)/build/linux_2.6/adf_ctl $(ICP_BUILD_OUTPUT)/etc/init.d/; ++ @cp $(LAC_PATH)/src/build/linux_2.6/kernel_space/$(DRIVER) $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers; ++ @cp $(LAC_PATH)/src/build/linux_2.6/user_space/lib$(BASENAME).a $(ICP_BUILD_OUTPUT)/$(DEST_LIBDIR); ++ @cp $(LAC_PATH)/src/build/linux_2.6/user_space/lib$(BASENAME)_s.so $(ICP_BUILD_OUTPUT)/$(DEST_LIBDIR); + + install_scripts: + @echo ; echo 'Copying Install Scripts'; +@@ -128,10 +137,10 @@ ifdef WITH_CPA_MUX + @cp $(ICP_BUILDSYSTEM_PATH)/build_files/qat_service_mux $(ICP_BUILD_OUTPUT)/qat_service; + endif + ifndef WITH_CPA_MUX +- @cp $(ICP_BUILDSYSTEM_PATH)/build_files/qat_service $(ICP_BUILD_OUTPUT)/; ++ @cp $(ICP_BUILDSYSTEM_PATH)/build_files/qat_service $(ICP_BUILD_OUTPUT)/etc/init.d; + endif +- @chmod 750 $(ICP_BUILD_OUTPUT)/qat_service; +- @cp $(CONFIG_PATH)/dh895xcc_qa_dev0.conf $(ICP_BUILD_OUTPUT)/; ++ @chmod 750 $(ICP_BUILD_OUTPUT)/etc/init.d/qat_service; ++ @cp $(CONFIG_PATH)/dh895xcc_qa_dev0.conf $(ICP_BUILD_OUTPUT)/etc/; + # @cp $(CONFIG_PATH)/dh89xxcc_qa_dev1.conf $(ICP_BUILD_OUTPUT)/; + # @cp $(CONFIG_PATH)/dh89xxcc_qa_dev0_single_accel.conf $(ICP_BUILD_OUTPUT)/; + +@@ -150,7 +159,6 @@ libosal_user: output_dir lac_lib_dir + @echo ; echo 'Building OSAL for user space'; + @cd $(OSAL_PATH)/src && $(MAKE) ARCH=$(ICP_ARCH_USER) ICP_ENV_DIR=$(ICP_TOP_ENV) OS_LEVEL=linux ICP_OS_LEVEL=user_space lib;\ + echo ; echo 'Copying OSAL library'; +- cp $(OSAL_PATH)/src/build/linux_2.6/user_space/libosal.a $(ICP_BUILD_OUTPUT)/; + + hal: output_dir libosal + @echo ; echo 'Building Hal Libs'; +@@ -175,7 +183,6 @@ libosal_uservf: output_dir lac_lib_dir + @echo ; echo 'Building OSAL for user space'; + @cd $(OSAL_PATH)/src && export ICP_WITHOUT_IOMMU=1 && $(MAKE) ICP_ENV_DIR=$(ICP_TOP_ENV) OS_LEVEL=linux ICP_OS_LEVEL=user_space lib;\ + echo ; echo 'Copying OSAL library'; +- cp $(OSAL_PATH)/src/build/linux_2.6/user_space/libosal.a $(ICP_BUILD_OUTPUT)/; + + adfvf: output_dir lac_lib_dir libosalvf + @echo ; echo 'Building ADFVF'; +@@ -185,13 +192,10 @@ adfvf: output_dir lac_lib_dir libosalvf + adf_user: output_dir lac_lib_dir libosal_user + @echo ; echo 'Building user ADF'; + @cd $(ADF_PATH) && export ADF_PLATFORM=ACCELDEV && export ICP_ENV_DIR=$(ICP_TOP_ENV) && export ONE_KO_RELEASE_PACKAGE=1 && ICP_OS_LEVEL=user_space && $(MAKE) ARCH=$(ICP_ARCH_USER) adf_user; +- cp $(ADF_PATH)/build/linux_2.6/libadf_proxy.a $(ICP_BUILD_OUTPUT)/; +- cp $(ADF_PATH)/build/linux_2.6/adf_ctl $(ICP_BUILD_OUTPUT)/; + + lac: output_dir libosal hal adf + @echo ; echo 'Building LAC'; + @cd $(LAC_PATH) && export ICP_ENV_DIR=$(ICP_TOP_ENV) && export ONE_KO_RELEASE_PACKAGE=1 && cd src && $(MAKE) ICP_OS_LEVEL=kernel_space OS_LEVEL=linux; +- @cp $(LAC_PATH)/src/build/linux_2.6/kernel_space/$(DRIVER) $(ICP_BUILD_OUTPUT)/; + + lacvf: output_dir libosalvf adfvf + @echo ; echo 'Building LACVF'; +@@ -199,20 +203,18 @@ ifdef WITH_CPA_MUX + @cp $(CPA_MUX_PATH)/Module.symvers $(LAC_PATH)/src/ + endif + @cd $(LAC_PATH) && export ADF_PLATFORM=ACCELDEVVF && export ICP_ENV_DIR=$(ICP_TOP_ENV) && export ONE_KO_RELEASE_PACKAGE=1 && cd src && $(MAKE) ICP_OS_LEVEL=kernel_space OS_LEVEL=linux; +- @cp $(LAC_PATH)/src/build/linux_2.6/kernel_space/$(BASENAME)_vf.ko $(ICP_BUILD_OUTPUT)/; + + lac_user: output_dir libosal_user adf_user + @echo ; echo 'Building LAC in user space'; + @cd $(LAC_PATH) && export ICP_ENV_DIR=$(ICP_TOP_ENV) && export ONE_KO_RELEASE_PACKAGE=1 && cd src && $(MAKE) ARCH=$(ICP_ARCH_USER) lib_static ICP_OS_LEVEL=user_space; +- cp $(LAC_PATH)/src/build/linux_2.6/user_space/lib$(BASENAME).a $(ICP_BUILD_OUTPUT)/; + @cd $(LAC_PATH) && export ICP_ENV_DIR=$(ICP_TOP_ENV) && export ONE_KO_RELEASE_PACKAGE=1 && cd src && $(MAKE) ARCH=$(ICP_ARCH_USER) lib_shared ICP_OS_LEVEL=user_space; +- cp $(LAC_PATH)/src/build/linux_2.6/user_space/lib$(BASENAME)_s.so $(ICP_BUILD_OUTPUT)/; ++ cp $(LAC_PATH)/src/build/linux_2.6/user_space/lib$(BASENAME)_s.so $(ICP_BUILD_OUTPUT); + + qat-fw: output_dir + @echo ; echo 'Copying QAT-FW Binary'; +- @cp -f $(QAT_FW_PATH)/icp_qat_ae.mof $(ICP_BUILD_OUTPUT)/mof_firmware.bin; ++ @cp -f $(QAT_FW_PATH)/icp_qat_ae.mof $(ICP_BUILD_OUTPUT)/lib/firmware/$(ICP_FIRMWARE_DIR)/mof_firmware.bin; + @echo ; echo 'Copying MMP Binary'; +- @cp -f $(QAT_FW_PATH)/icp_qat_pke.mof $(ICP_BUILD_OUTPUT)/mmp_firmware.bin; ++ @cp -f $(QAT_FW_PATH)/icp_qat_pke.mof $(ICP_BUILD_OUTPUT)/lib/firmware/$(ICP_FIRMWARE_DIR)/mmp_firmware.bin; + + qat_mux: output_dir libosal + @echo ; echo 'Building qat_mux module' +@@ -248,6 +250,10 @@ endif + + output_dir: + test -d $(ICP_BUILD_OUTPUT) || mkdir -p $(ICP_BUILD_OUTPUT); ++ test -d $(ICP_BUILD_OUTPUT)$(DEST_LIBDIR) || mkdir -p $(ICP_BUILD_OUTPUT)$(DEST_LIBDIR); ++ test -d $(ICP_BUILD_OUTPUT)/lib/firmware/$(ICP_FIRMWARE_DIR) || mkdir -p $(ICP_BUILD_OUTPUT)/lib/firmware/$(ICP_FIRMWARE_DIR); ++ test -d $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers || mkdir -p $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers; ++ test -d $(ICP_BUILD_OUTPUT)/etc/init.d || mkdir -p $(ICP_BUILD_OUTPUT)/etc/init.d; + + lac_lib_dir: + test -d $(LAC_LIB_DIR) || mkdir -p $(LAC_LIB_DIR); +diff --git a/quickassist/lookaside/access_layer/src/sample_code/Makefile b/quickassist/lookaside/access_layer/src/sample_code/Makefile +index e13bbf0..fbc575e 100644 +--- a/quickassist/lookaside/access_layer/src/sample_code/Makefile ++++ b/quickassist/lookaside/access_layer/src/sample_code/Makefile +@@ -95,6 +95,7 @@ SAMPLE_PATH?=$(ICP_ROOT)/quickassist/lookaside/access_layer/src/sample_code + PERF_PATH?=$(ICP_ROOT)/quickassist/lookaside/access_layer/src/sample_code/performance + FIPS_PATH?=$(ICP_ROOT)/quickassist/lookaside/access_layer/src/sample_code/fips + FUNC_PATH=$(SAMPLE_PATH)/functional ++FIPS_OUTPUT_NAME=fips_sample + + #include the makefile with all the default and common Make variable definitions + include $(ICP_BUILDSYSTEM_PATH)/build_files/common.mk +@@ -106,6 +107,8 @@ SAMPLE_BUILD_OUTPUT?=$(SAMPLE_PATH)/build + + output_dir: + test -d $(SAMPLE_BUILD_OUTPUT) || mkdir $(SAMPLE_BUILD_OUTPUT); ++ test -d $(SAMPLE_BUILD_OUTPUT)$(DEST_BINDIR) || mkdir -p $(SAMPLE_BUILD_OUTPUT)$(DEST_BINDIR) ++ + fips_code: + @if test -d $(FIPS_PATH); then echo ; echo 'Building FIPS Code'; fi; + @if test -d $(FIPS_PATH); \ +@@ -162,17 +165,13 @@ endif + perf_all: $(PERF_ALL) + @echo ; echo "Build output location $(SAMPLE_BUILD_OUTPUT)"; + +- + perf_user: output_dir + @echo ; echo "Building perf_user"; + @cd $(PERF_PATH) && $(MAKE) clean ICP_OS_LEVEL=user_space && $(MAKE) ICP_OS_LEVEL=user_space lib_shared exe +- @cp $(PERF_PATH)/build/linux_2.6/user_space/$(PERF_OUTPUT_NAME)_s.so $(SAMPLE_BUILD_OUTPUT)/; +- @cp $(PERF_PATH)/build/linux_2.6/user_space/$(PERF_OUTPUT_NAME) $(SAMPLE_BUILD_OUTPUT)/; + + perf_kernel: output_dir + @echo ; echo "Building perf_kernel"; + @cd $(PERF_PATH) && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(PERF_PATH)/build/linux_2.6/$(ICP_OS_LEVEL)/$(PERF_OUTPUT_NAME).ko $(SAMPLE_BUILD_OUTPUT)/; + + common_mem_drv_kernel: output_dir + @echo ; echo "Building common_mem_drv kernel space"; +@@ -187,12 +186,19 @@ common_mem_drv_user: output_dir + perf_qae: output_dir + @echo ; echo "Building perf_qae"; + @cd $(CMN_ROOT)/linux/kernel_space && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(CMN_ROOT)/linux/kernel_space/build/linux_2.6/$(ICP_OS_LEVEL)/$(CMN_MODULE_NAME).ko $(SAMPLE_BUILD_OUTPUT)/; +- + + func: output_dir + @cd $(FUNC_PATH) && $(MAKE) all; + ++install: output_dir ++ @cp $(PERF_PATH)/build/linux_2.6/user_space/$(PERF_OUTPUT_NAME)_s.so $(SAMPLE_BUILD_OUTPUT)$(DEST_LIBDIR); ++ @cp $(PERF_PATH)/build/linux_2.6/user_space/$(PERF_OUTPUT_NAME) $(SAMPLE_BUILD_OUTPUT)$(DEST_BINDIR); ++ @cp $(PERF_PATH)/build/linux_2.6/$(ICP_OS_LEVEL)/$(PERF_OUTPUT_NAME).ko $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers; ++ @cp $(CMN_ROOT)/linux/kernel_space/build/linux_2.6/$(ICP_OS_LEVEL)/$(CMN_MODULE_NAME).ko $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers; ++ @cp $(FIPS_PATH)/build/linux_2.6/$(ICP_OS_LEVEL)/$(FIPS_OUTPUT_NAME).ko $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers; ++ @cp $(FIPS_PATH)/build/linux_2.6/user_space/$(FIPS_OUTPUT_NAME)_s.so $(SAMPLE_BUILD_OUTPUT)$(DEST_LIBDIR); ++ @cp $(FIPS_PATH)/build/linux_2.6/user_space/$(FIPS_OUTPUT_NAME).a $(SAMPLE_BUILD_OUTPUT)$(DEST_LIBDIR); ++ @cd $(FUNC_PATH) && $(MAKE) install; + + all: $(MEM_DRIVER) fips_code perf_user perf_kernel func + perf: $(MEM_DRIVER) perf_kernel +diff --git a/quickassist/lookaside/access_layer/src/sample_code/functional/Makefile b/quickassist/lookaside/access_layer/src/sample_code/functional/Makefile +index 3625637..322622b 100644 +--- a/quickassist/lookaside/access_layer/src/sample_code/functional/Makefile ++++ b/quickassist/lookaside/access_layer/src/sample_code/functional/Makefile +@@ -64,6 +64,8 @@ SYM_PATH?=$(SAMPLE_PATH)/sym + ASYM_PATH?=$(SAMPLE_PATH)/asym + ICP_API_DIR?=$(ICP_ROOT)/quickassist/include/ + ICP_LAC_DIR?=$(ICP_ROOT)/quickassist/lookaside/access_layer/ ++BIN_INSTALLPATH=$(SAMPLE_BUILD_OUTPUT)$(DEST_BINDIR)/ ++MODULE_INSTALLPATH=$(SAMPLE_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers + + ifeq ($(WITH_CMDRV),1) + CMN_ROOT?=$(ICP_ROOT)/quickassist/utilities/libqae_mem/ +@@ -110,6 +112,7 @@ SAMPLE_BUILD_OUTPUT?=$(SAMPLE_PATH)/build + + output_dir: + test -d $(SAMPLE_BUILD_OUTPUT) || mkdir $(SAMPLE_BUILD_OUTPUT); ++ test -d $(BIN_INSTALLPATH) || mkdir -p $(BIN_INSTALLPATH); + + BUILD_DC=dc_dp_sample stateless_sample stateful_sample \ + stateless_multi_op_checksum_sample +@@ -119,31 +122,23 @@ dc: $(BUILD_DC) + + dc_dp_sample: output_dir + @cd $(DC_PATH)/dc_dp_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(DC_PATH)/dc_dp_sample/dc_dp_sample $(SAMPLE_BUILD_OUTPUT)/; + ifneq ($(WITH_UPSTREAM),1) + @cd $(DC_PATH)/dc_dp_sample && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(DC_PATH)/dc_dp_sample/dc_dp_sample.ko $(SAMPLE_BUILD_OUTPUT)/; + endif + + stateless_sample: output_dir + @cd $(DC_PATH)/stateless_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(DC_PATH)/stateless_sample/dc_stateless_sample $(SAMPLE_BUILD_OUTPUT)/; + ifneq ($(WITH_UPSTREAM),1) + @cd $(DC_PATH)/stateless_sample && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(DC_PATH)/stateless_sample/dc_stateless_sample.ko $(SAMPLE_BUILD_OUTPUT)/; + endif + + stateful_sample: output_dir + @cd $(DC_PATH)/stateful_sample && $(MAKE) clean ICP_OS_LEVEL=user_space && $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(DC_PATH)/stateful_sample/dc_stateful_sample $(SAMPLE_BUILD_OUTPUT)/; +- @cp $(DC_PATH)/stateful_sample/paper4 $(SAMPLE_BUILD_OUTPUT)/; + + stateless_multi_op_checksum_sample: output_dir + @cd $(DC_PATH)/stateless_multi_op_checksum_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(DC_PATH)/stateless_multi_op_checksum_sample/dc_stateless_multi_op_sample $(SAMPLE_BUILD_OUTPUT)/; + ifneq ($(WITH_UPSTREAM),1) + @cd $(DC_PATH)/stateless_multi_op_checksum_sample && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(DC_PATH)/stateless_multi_op_checksum_sample/dc_stateless_multi_op_sample.ko $(SAMPLE_BUILD_OUTPUT)/; + endif + + BUILD_SYN=algchaining_sample ccm_sample cipher_sample \ +@@ -159,86 +154,65 @@ sym:$(BUILD_SYN) + @echo ; echo "Build sym component"; + algchaining_sample: output_dir + @cd $(SYM_PATH)/alg_chaining_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(SYM_PATH)/alg_chaining_sample/algchaining_sample $(SAMPLE_BUILD_OUTPUT)/; + ifneq ($(WITH_UPSTREAM),1) + @cd $(SYM_PATH)/alg_chaining_sample && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(SYM_PATH)/alg_chaining_sample/algchaining_sample.ko $(SAMPLE_BUILD_OUTPUT)/; + endif + + ccm_sample: output_dir + @cd $(SYM_PATH)/ccm_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(SYM_PATH)/ccm_sample/ccm_sample $(SAMPLE_BUILD_OUTPUT)/; + ifneq ($(WITH_UPSTREAM),1) + @cd $(SYM_PATH)/ccm_sample && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(SYM_PATH)/ccm_sample/ccm_sample.ko $(SAMPLE_BUILD_OUTPUT)/; + endif + + cipher_sample: output_dir + @cd $(SYM_PATH)/cipher_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(SYM_PATH)/cipher_sample/cipher_sample $(SAMPLE_BUILD_OUTPUT)/; + ifneq ($(WITH_UPSTREAM),1) + @cd $(SYM_PATH)/cipher_sample && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(SYM_PATH)/cipher_sample/cipher_sample.ko $(SAMPLE_BUILD_OUTPUT)/; + endif + + drbg_sample: output_dir + @cd $(SYM_PATH)/drbg_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(SYM_PATH)/drbg_sample/drbg_sample $(SAMPLE_BUILD_OUTPUT)/; + ifneq ($(WITH_UPSTREAM),1) + @cd $(SYM_PATH)/drbg_sample && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(SYM_PATH)/drbg_sample/drbg_sample.ko $(SAMPLE_BUILD_OUTPUT)/; + endif + + gcm_sample: output_dir + @cd $(SYM_PATH)/gcm_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(SYM_PATH)/gcm_sample/gcm_sample $(SAMPLE_BUILD_OUTPUT)/; + ifneq ($(WITH_UPSTREAM),1) + @cd $(SYM_PATH)/gcm_sample && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(SYM_PATH)/gcm_sample/gcm_sample.ko $(SAMPLE_BUILD_OUTPUT)/; + endif + + hash_file_sample: output_dir + @cd $(SYM_PATH)/hash_file_sample && $(MAKE) clean ICP_OS_LEVEL=user_space&& $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(SYM_PATH)/hash_file_sample/hash_file_sample $(SAMPLE_BUILD_OUTPUT)/; + + hash_sample: output_dir + @cd $(SYM_PATH)/hash_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(SYM_PATH)/hash_sample/hash_sample $(SAMPLE_BUILD_OUTPUT)/; + ifneq ($(WITH_UPSTREAM),1) + @cd $(SYM_PATH)/hash_sample && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(SYM_PATH)/hash_sample/hash_sample.ko $(SAMPLE_BUILD_OUTPUT)/; + endif + + ipsec_sample: output_dir + @cd $(SYM_PATH)/ipsec_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(SYM_PATH)/ipsec_sample/ipsec_sample $(SAMPLE_BUILD_OUTPUT)/; + ifneq ($(WITH_UPSTREAM),1) + @cd $(SYM_PATH)/ipsec_sample && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(SYM_PATH)/ipsec_sample/ipsec_sample.ko $(SAMPLE_BUILD_OUTPUT)/; + endif + + nrbg_sample: output_dir + @cd $(SYM_PATH)/nrbg_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(SYM_PATH)/nrbg_sample/nrbg_sample $(SAMPLE_BUILD_OUTPUT)/; + ifneq ($(WITH_UPSTREAM),1) + @cd $(SYM_PATH)/nrbg_sample && $(MAKE) && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(SYM_PATH)/nrbg_sample/nrbg_sample.ko $(SAMPLE_BUILD_OUTPUT)/; + endif + + ssl_sample: output_dir + @cd $(SYM_PATH)/ssl_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(SYM_PATH)/ssl_sample/ssl_sample $(SAMPLE_BUILD_OUTPUT)/; + ifneq ($(WITH_UPSTREAM),1) + @cd $(SYM_PATH)/ssl_sample && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(SYM_PATH)/ssl_sample/ssl_sample.ko $(SAMPLE_BUILD_OUTPUT)/; + endif + + sym_dp_sample: output_dir + @cd $(SYM_PATH)/symdp_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(SYM_PATH)/symdp_sample/sym_dp_sample $(SAMPLE_BUILD_OUTPUT)/; + ifneq ($(WITH_UPSTREAM),1) + @cd $(SYM_PATH)/symdp_sample && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(SYM_PATH)/symdp_sample/sym_dp_sample.ko $(SAMPLE_BUILD_OUTPUT)/; + endif + + BUILD_ASYM=diffie_hellman_sample prime_sample +@@ -248,18 +222,51 @@ asym: $(BUILD_ASYM) + + diffie_hellman_sample: output_dir + @cd $(ASYM_PATH)/diffie_hellman_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(ASYM_PATH)/diffie_hellman_sample/dh_sample $(SAMPLE_BUILD_OUTPUT)/; + ifneq ($(WITH_UPSTREAM),1) + @cd $(ASYM_PATH)/diffie_hellman_sample && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(ASYM_PATH)/diffie_hellman_sample/dh_sample.ko $(SAMPLE_BUILD_OUTPUT)/; + endif + + prime_sample: output_dir + @cd $(ASYM_PATH)/prime_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(ASYM_PATH)/prime_sample/prime_sample $(SAMPLE_BUILD_OUTPUT)/; + ifneq ($(WITH_UPSTREAM),1) + @cd $(ASYM_PATH)/prime_sample && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(ASYM_PATH)/prime_sample/prime_sample.ko $(SAMPLE_BUILD_OUTPUT)/; ++endif ++ ++install: output_dir ++ @cp $(DC_PATH)/dc_dp_sample/dc_dp_sample $(BIN_INSTALLPATH); ++ @cp $(DC_PATH)/stateless_sample/dc_stateless_sample $(BIN_INSTALLPATH); ++ @cp $(DC_PATH)/stateful_sample/dc_stateful_sample $(BIN_INSTALLPATH); ++ @cp $(DC_PATH)/stateful_sample/paper4 $(BIN_INSTALLPATH); ++ @cp $(DC_PATH)/stateless_multi_op_checksum_sample/dc_stateless_multi_op_sample $(BIN_INSTALLPATH); ++ @cp $(SYM_PATH)/alg_chaining_sample/algchaining_sample $(BIN_INSTALLPATH); ++ @cp $(SYM_PATH)/ccm_sample/ccm_sample $(BIN_INSTALLPATH); ++ @cp $(SYM_PATH)/cipher_sample/cipher_sample $(BIN_INSTALLPATH); ++ @cp $(SYM_PATH)/drbg_sample/drbg_sample $(BIN_INSTALLPATH); ++ @cp $(SYM_PATH)/gcm_sample/gcm_sample $(BIN_INSTALLPATH); ++ @cp $(SYM_PATH)/hash_file_sample/hash_file_sample $(BIN_INSTALLPATH); ++ @cp $(SYM_PATH)/hash_sample/hash_sample $(BIN_INSTALLPATH); ++ @cp $(SYM_PATH)/ipsec_sample/ipsec_sample $(BIN_INSTALLPATH); ++ @cp $(SYM_PATH)/nrbg_sample/nrbg_sample $(BIN_INSTALLPATH); ++ @cp $(SYM_PATH)/ssl_sample/ssl_sample $(BIN_INSTALLPATH); ++ @cp $(SYM_PATH)/symdp_sample/sym_dp_sample $(BIN_INSTALLPATH); ++ @cp $(ASYM_PATH)/diffie_hellman_sample/dh_sample $(BIN_INSTALLPATH); ++ @cp $(ASYM_PATH)/prime_sample/prime_sample $(BIN_INSTALLPATH); ++ifneq ($(WITH_UPSTREAM),1) ++ @cp $(DC_PATH)/dc_dp_sample/dc_dp_sample.ko $(MODULE_INSTALLPATH); ++ @cp $(DC_PATH)/stateless_sample/dc_stateless_sample.ko $(MODULE_INSTALLPATH); ++ @cp $(DC_PATH)/stateless_multi_op_checksum_sample/dc_stateless_multi_op_sample.ko $(MODULE_INSTALLPATH); ++ @cp $(SYM_PATH)/alg_chaining_sample/algchaining_sample.ko $(MODULE_INSTALLPATH); ++ @cp $(SYM_PATH)/ccm_sample/ccm_sample.ko $(MODULE_INSTALLPATH); ++ @cp $(SYM_PATH)/cipher_sample/cipher_sample.ko $(MODULE_INSTALLPATH); ++ @cp $(SYM_PATH)/drbg_sample/drbg_sample.ko $(MODULE_INSTALLPATH); ++ @cp $(SYM_PATH)/gcm_sample/gcm_sample.ko $(MODULE_INSTALLPATH); ++ @cp $(SYM_PATH)/hash_sample/hash_sample.ko $(MODULE_INSTALLPATH); ++ @cp $(SYM_PATH)/ipsec_sample/ipsec_sample.ko $(MODULE_INSTALLPATH); ++ @cp $(SYM_PATH)/nrbg_sample/nrbg_sample.ko $(MODULE_INSTALLPATH); ++ @cp $(SYM_PATH)/ssl_sample/ssl_sample.ko $(MODULE_INSTALLPATH); ++ @cp $(SYM_PATH)/symdp_sample/sym_dp_sample.ko $(MODULE_INSTALLPATH); ++ @cp $(ASYM_PATH)/diffie_hellman_sample/dh_sample.ko $(MODULE_INSTALLPATH); ++ @cp $(ASYM_PATH)/prime_sample/prime_sample.ko $(MODULE_INSTALLPATH); + endif + + CLEAN_DC=clean_dc_dp_sample clean_stateless_sample \ +-- +1.7.9.5 + diff --git a/meta-qat/recipes-extended/qat/qat16/qat16_2.5.0-80-qat-change-in-return-type-of-func-in-kernel-v4.4.patch b/meta-qat/recipes-extended/qat/qat16/qat16_2.5.0-80-qat-change-in-return-type-of-func-in-kernel-v4.4.patch new file mode 100644 index 00000000..b427799b --- /dev/null +++ b/meta-qat/recipes-extended/qat/qat16/qat16_2.5.0-80-qat-change-in-return-type-of-func-in-kernel-v4.4.patch @@ -0,0 +1,40 @@ +From f056dbedd106e03860de66d5c84cd018da087dda Mon Sep 17 00:00:00 2001 +From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> +Date: Tue, 22 Mar 2016 00:59:36 +0800 +Subject: [PATCH 1/2] qat: change in return type of func in kernel v4.4 + +Upstream-Status: Submitted + +The function 'seq_puts' return type is changed from 'int' to 'void'. +Now use of 'ret' variable is not valid. So used another condition to check +for overflow. + +Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> +--- + quickassist/adf/drivers/common/linux/src/adf_proc_debug.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/quickassist/adf/drivers/common/linux/src/adf_proc_debug.c b/quickassist/adf/drivers/common/linux/src/adf_proc_debug.c +index 7d81eaa..a1dd917 100755 +--- a/quickassist/adf/drivers/common/linux/src/adf_proc_debug.c ++++ b/quickassist/adf/drivers/common/linux/src/adf_proc_debug.c +@@ -132,13 +132,13 @@ static int adf_debug_show(struct seq_file *sfile, void *v) + { + debug_file_info_t* file_info = sfile->private; + if (file_info && file_info->seq_read && file_info->page) { +- int ret = 0, old_offset = file_info->offset; ++ int old_offset = file_info->offset; + file_info->offset = + file_info->seq_read(file_info->private_data, + file_info->page, PAGE_SIZE - 1, + file_info->offset); +- ret = seq_puts(sfile, (char*)file_info->page); +- if (ret) { ++ seq_puts(sfile, (char*)file_info->page); ++ if (sfile->count == sfile->size) { + /* run out of space - need to reprint */ + file_info->offset = old_offset; + } +-- +1.9.1 + diff --git a/meta-qat/recipes-extended/qat/qat16/qat16_2.6.0-65-qat-add-install-target-to-makefiles.patch b/meta-qat/recipes-extended/qat/qat16/qat16_2.6.0-65-qat-add-install-target-to-makefiles.patch new file mode 100644 index 00000000..39600228 --- /dev/null +++ b/meta-qat/recipes-extended/qat/qat16/qat16_2.6.0-65-qat-add-install-target-to-makefiles.patch @@ -0,0 +1,353 @@ +From f53aeef0ae6a89066cca8c9a9154e70408f6ef68 Mon Sep 17 00:00:00 2001 +From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> +Date: Thu, 24 Mar 2016 01:11:02 +0800 +Subject: [PATCH] qat: add install target to makefiles + +Upstream-Status: Inappropriate [Configuration] + +Added an install target to makefiles to help +install ingredients at a proper path. + +Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> +--- + quickassist/Makefile | 29 ++++++--- + .../access_layer/src/sample_code/Makefile | 19 ++++-- + .../src/sample_code/functional/Makefile | 74 ++++++++++++---------- + 3 files changed, 75 insertions(+), 47 deletions(-) + +diff --git a/quickassist/Makefile b/quickassist/Makefile +index 6c5d436..0a1ee4c 100644 +--- a/quickassist/Makefile ++++ b/quickassist/Makefile +@@ -109,7 +109,7 @@ ifdef WITH_CPA_MUX + ALL_TARGETS = clean lac_lib_dir libosal libosal_user qat_mux hal adf adf_user lac lac_user qat-fw install_scripts + ALL_TARGETS_CI = lac_lib_dir qat_mux_ci lac_ci lac_user_ci qat-fw install_scripts + else +-ALL_TARGETS = clean lac_lib_dir libosal libosal_user hal adf adf_user lac lac_user qat-fw install_scripts ++ALL_TARGETS = clean lac_lib_dir libosal libosal_user hal adf adf_user lac lac_user + ALL_TARGETS_CI = lac_lib_dir lac_ci lac_user_ci qat-fw install_scripts + endif + ICP_ARCH_USER?=`uname -m` +@@ -125,7 +125,16 @@ all_ci: $(ALL_TARGETS_CI) + @echo 'Build Done'; + + user: lac_lib_dir libosal_user adf_user lac_user +-kernel: lac_lib_dir libosal hal adf lac qat-fw install_scripts ++kernel: lac_lib_dir libosal hal adf lac qat-fw ++ ++install: qat-fw install_scripts ++ @cp $(OSAL_PATH)/src/build/linux_2.6/user_space/libosal.a $(ICP_BUILD_OUTPUT)/$(DEST_LIBDIR); ++ @cp $(OSAL_PATH)/src/build/linux_2.6/user_space/libosal.a $(ICP_BUILD_OUTPUT)/$(DEST_LIBDIR); ++ @cp $(ADF_PATH)/build/linux_2.6/libadf_proxy.a $(ICP_BUILD_OUTPUT)/$(DEST_LIBDIR); ++ @cp $(ADF_PATH)/build/linux_2.6/adf_ctl $(ICP_BUILD_OUTPUT)/etc/init.d/; ++ @cp $(LAC_PATH)/src/build/linux_2.6/kernel_space/$(DRIVER) $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers; ++ @cp $(LAC_PATH)/src/build/linux_2.6/user_space/lib$(BASENAME).a $(ICP_BUILD_OUTPUT)/$(DEST_LIBDIR); ++ @cp $(LAC_PATH)/src/build/linux_2.6/user_space/lib$(BASENAME)_s.so $(ICP_BUILD_OUTPUT)/$(DEST_LIBDIR); + + install_scripts: + @echo ; echo 'Copying Install Scripts'; +@@ -133,10 +142,10 @@ ifdef WITH_CPA_MUX + @cp $(ICP_BUILDSYSTEM_PATH)/build_files/qat_service_mux $(ICP_BUILD_OUTPUT)/qat_service; + endif + ifndef WITH_CPA_MUX +- @cp $(ICP_BUILDSYSTEM_PATH)/build_files/qat_service $(ICP_BUILD_OUTPUT)/; ++ @cp $(ICP_BUILDSYSTEM_PATH)/build_files/qat_service $(ICP_BUILD_OUTPUT)/etc/init.d; + endif +- @chmod 750 $(ICP_BUILD_OUTPUT)/qat_service; +- @cp $(CONFIG_PATH)/dh895xcc_qa_dev0.conf $(ICP_BUILD_OUTPUT)/; ++ @chmod 750 $(ICP_BUILD_OUTPUT)/etc/init.d/qat_service; ++ @cp $(CONFIG_PATH)/dh895xcc_qa_dev0.conf $(ICP_BUILD_OUTPUT)/etc/; + # @cp $(CONFIG_PATH)/dh89xxcc_qa_dev1.conf $(ICP_BUILD_OUTPUT)/; + # @cp $(CONFIG_PATH)/dh89xxcc_qa_dev0_single_accel.conf $(ICP_BUILD_OUTPUT)/; + +@@ -233,7 +242,7 @@ lac_user: output_dir libosal_user adf_user + @cd $(LAC_PATH) && export ICP_ENV_DIR=$(ICP_TOP_ENV) && export ONE_KO_RELEASE_PACKAGE=1 && cd src && $(MAKE) ARCH=$(ICP_ARCH_USER) lib_static ICP_OS_LEVEL=user_space; + cp $(LAC_PATH)/src/build/linux_2.6/user_space/lib$(BASENAME).a $(ICP_BUILD_OUTPUT)/; + @cd $(LAC_PATH) && export ICP_ENV_DIR=$(ICP_TOP_ENV) && export ONE_KO_RELEASE_PACKAGE=1 && cd src && $(MAKE) ARCH=$(ICP_ARCH_USER) lib_shared ICP_OS_LEVEL=user_space; +- cp $(LAC_PATH)/src/build/linux_2.6/user_space/lib$(BASENAME)_s.so $(ICP_BUILD_OUTPUT)/; ++ cp $(LAC_PATH)/src/build/linux_2.6/user_space/lib$(BASENAME)_s.so $(ICP_BUILD_OUTPUT); + + lac_user_ci: output_dir + @echo ; echo 'Building LAC in user space'; +@@ -244,9 +253,9 @@ lac_user_ci: output_dir + + qat-fw: output_dir + @echo ; echo 'Copying QAT-FW Binary'; +- @cp -f $(QAT_FW_PATH)/icp_qat_ae.mof $(ICP_BUILD_OUTPUT)/mof_firmware.bin; ++ @cp -f $(QAT_FW_PATH)/icp_qat_ae.mof $(ICP_BUILD_OUTPUT)/lib/firmware/$(ICP_FIRMWARE_DIR)/mof_firmware.bin; + @echo ; echo 'Copying MMP Binary'; +- @cp -f $(QAT_FW_PATH)/icp_qat_pke.mof $(ICP_BUILD_OUTPUT)/mmp_firmware.bin; ++ @cp -f $(QAT_FW_PATH)/icp_qat_pke.mof $(ICP_BUILD_OUTPUT)/lib/firmware/$(ICP_FIRMWARE_DIR)/mmp_firmware.bin; + + qat_mux: output_dir libosal + @echo ; echo 'Building qat_mux module' +@@ -306,6 +315,10 @@ endif + + output_dir: + test -d $(ICP_BUILD_OUTPUT) || mkdir -p $(ICP_BUILD_OUTPUT); ++ test -d $(ICP_BUILD_OUTPUT)$(DEST_LIBDIR) || mkdir -p $(ICP_BUILD_OUTPUT)$(DEST_LIBDIR); ++ test -d $(ICP_BUILD_OUTPUT)/lib/firmware/$(ICP_FIRMWARE_DIR) || mkdir -p $(ICP_BUILD_OUTPUT)/lib/firmware/$(ICP_FIRMWARE_DIR); ++ test -d $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers || mkdir -p $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers; ++ test -d $(ICP_BUILD_OUTPUT)/etc/init.d || mkdir -p $(ICP_BUILD_OUTPUT)/etc/init.d; + + lac_lib_dir: + test -d $(LAC_LIB_DIR) || mkdir -p $(LAC_LIB_DIR); +diff --git a/quickassist/lookaside/access_layer/src/sample_code/Makefile b/quickassist/lookaside/access_layer/src/sample_code/Makefile +index c66ecfb..4cc3dbf 100644 +--- a/quickassist/lookaside/access_layer/src/sample_code/Makefile ++++ b/quickassist/lookaside/access_layer/src/sample_code/Makefile +@@ -89,6 +89,7 @@ SAMPLE_PATH?=$(ICP_ROOT)/quickassist/lookaside/access_layer/src/sample_code + PERF_PATH?=$(ICP_ROOT)/quickassist/lookaside/access_layer/src/sample_code/performance + FIPS_PATH?=$(ICP_ROOT)/quickassist/lookaside/access_layer/src/sample_code/fips + FUNC_PATH=$(SAMPLE_PATH)/functional ++FIPS_OUTPUT_NAME=fips_sample + + #include the makefile with all the default and common Make variable definitions + include $(ICP_BUILDSYSTEM_PATH)/build_files/common.mk +@@ -100,6 +101,8 @@ SAMPLE_BUILD_OUTPUT?=$(SAMPLE_PATH)/build + + output_dir: + test -d $(SAMPLE_BUILD_OUTPUT) || mkdir $(SAMPLE_BUILD_OUTPUT); ++ test -d $(SAMPLE_BUILD_OUTPUT)$(DEST_BINDIR) || mkdir -p $(SAMPLE_BUILD_OUTPUT)$(DEST_BINDIR) ++ + fips_code: + @if test -d $(FIPS_PATH); then echo ; echo 'Building FIPS Code'; fi; + @if test -d $(FIPS_PATH); \ +@@ -154,14 +157,11 @@ perf_all: $(PERF_ALL) + perf_user: output_dir + @echo ; echo "Building perf_user"; + @cd $(PERF_PATH) && $(MAKE) clean ICP_OS_LEVEL=user_space && $(MAKE) ARCH=$(ICP_ARCH_USER) ICP_OS_LEVEL=user_space lib_shared exe +- @cp $(PERF_PATH)/build/linux_2.6/user_space/$(PERF_OUTPUT_NAME)_s.so $(SAMPLE_BUILD_OUTPUT)/; +- @cp $(PERF_PATH)/build/linux_2.6/user_space/$(PERF_OUTPUT_NAME) $(SAMPLE_BUILD_OUTPUT)/; + + perf_kernel: output_dir + @echo ; echo "Building perf_kernel"; + @cd $(PERF_PATH) && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(PERF_PATH)/build/linux_2.6/$(ICP_OS_LEVEL)/$(PERF_OUTPUT_NAME).ko $(SAMPLE_BUILD_OUTPUT)/; +- ++ + common_mem_drv_kernel: output_dir + @echo ; echo "Building common_mem_drv kernel space"; + @cd $(CMN_ROOT) && $(MAKE) ICP_OS_LEVEL=user_space cm_kernel +@@ -175,12 +175,19 @@ common_mem_drv_user: output_dir + perf_qae: output_dir + @echo ; echo "Building perf_qae"; + @cd $(CMN_ROOT)/linux/kernel_space && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(CMN_ROOT)/linux/kernel_space/build/linux_2.6/$(ICP_OS_LEVEL)/$(CMN_MODULE_NAME).ko $(SAMPLE_BUILD_OUTPUT)/; +- + + func: output_dir + @cd $(FUNC_PATH) && $(MAKE) all; + ++install: output_dir ++ @cp $(PERF_PATH)/build/linux_2.6/user_space/$(PERF_OUTPUT_NAME)_s.so $(SAMPLE_BUILD_OUTPUT)$(DEST_LIBDIR); ++ @cp $(PERF_PATH)/build/linux_2.6/user_space/$(PERF_OUTPUT_NAME) $(SAMPLE_BUILD_OUTPUT)$(DEST_BINDIR); ++ @cp $(PERF_PATH)/build/linux_2.6/$(ICP_OS_LEVEL)/$(PERF_OUTPUT_NAME).ko $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers; ++ @cp $(CMN_ROOT)/linux/kernel_space/build/linux_2.6/$(ICP_OS_LEVEL)/$(CMN_MODULE_NAME).ko $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers; ++ @cp $(FIPS_PATH)/build/linux_2.6/$(ICP_OS_LEVEL)/$(FIPS_OUTPUT_NAME).ko $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers; ++ @cp $(FIPS_PATH)/build/linux_2.6/user_space/$(FIPS_OUTPUT_NAME)_s.so $(SAMPLE_BUILD_OUTPUT)$(DEST_LIBDIR); ++ @cp $(FIPS_PATH)/build/linux_2.6/user_space/$(FIPS_OUTPUT_NAME).a $(SAMPLE_BUILD_OUTPUT)$(DEST_LIBDIR); ++ @cd $(FUNC_PATH) && $(MAKE) install; + + all: $(MEM_DRIVER) fips_code perf_user perf_kernel func + perf: $(MEM_DRIVER) perf_kernel +diff --git a/quickassist/lookaside/access_layer/src/sample_code/functional/Makefile b/quickassist/lookaside/access_layer/src/sample_code/functional/Makefile +index 3208acf..41754e8 100644 +--- a/quickassist/lookaside/access_layer/src/sample_code/functional/Makefile ++++ b/quickassist/lookaside/access_layer/src/sample_code/functional/Makefile +@@ -64,6 +64,8 @@ SYM_PATH?=$(SAMPLE_PATH)/sym + ASYM_PATH?=$(SAMPLE_PATH)/asym + ICP_API_DIR?=$(ICP_ROOT)/quickassist/include/ + ICP_LAC_DIR?=$(ICP_ROOT)/quickassist/lookaside/access_layer/ ++BIN_INSTALLPATH=$(SAMPLE_BUILD_OUTPUT)$(DEST_BINDIR)/ ++MODULE_INSTALLPATH=$(SAMPLE_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers + + CMN_ROOT?=$(ICP_ROOT)/quickassist/lookaside/access_layer/src/sample_code/performance/qae/ + CMN_MODULE_NAME?=qaeMemDrv +@@ -105,6 +107,7 @@ SAMPLE_BUILD_OUTPUT?=$(SAMPLE_PATH)/build + + output_dir: + test -d $(SAMPLE_BUILD_OUTPUT) || mkdir $(SAMPLE_BUILD_OUTPUT); ++ test -d $(BIN_INSTALLPATH) || mkdir -p $(BIN_INSTALLPATH); + + BUILD_DC=dc_dp_sample stateless_sample stateful_sample \ + stateless_multi_op_checksum_sample +@@ -114,31 +117,23 @@ dc: $(BUILD_DC) + + dc_dp_sample: output_dir + @cd $(DC_PATH)/dc_dp_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(DC_PATH)/dc_dp_sample/dc_dp_sample $(SAMPLE_BUILD_OUTPUT)/; + ifneq ($(WITH_UPSTREAM),1) + @cd $(DC_PATH)/dc_dp_sample && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(DC_PATH)/dc_dp_sample/dc_dp_sample.ko $(SAMPLE_BUILD_OUTPUT)/; + endif + + stateless_sample: output_dir + @cd $(DC_PATH)/stateless_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(DC_PATH)/stateless_sample/dc_stateless_sample $(SAMPLE_BUILD_OUTPUT)/; + ifneq ($(WITH_UPSTREAM),1) + @cd $(DC_PATH)/stateless_sample && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(DC_PATH)/stateless_sample/dc_stateless_sample.ko $(SAMPLE_BUILD_OUTPUT)/; + endif + + stateful_sample: output_dir + @cd $(DC_PATH)/stateful_sample && $(MAKE) clean ICP_OS_LEVEL=user_space && $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(DC_PATH)/stateful_sample/dc_stateful_sample $(SAMPLE_BUILD_OUTPUT)/; +- @cp $(DC_PATH)/stateful_sample/paper4 $(SAMPLE_BUILD_OUTPUT)/; + + stateless_multi_op_checksum_sample: output_dir + @cd $(DC_PATH)/stateless_multi_op_checksum_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(DC_PATH)/stateless_multi_op_checksum_sample/dc_stateless_multi_op_sample $(SAMPLE_BUILD_OUTPUT)/; + ifneq ($(WITH_UPSTREAM),1) + @cd $(DC_PATH)/stateless_multi_op_checksum_sample && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(DC_PATH)/stateless_multi_op_checksum_sample/dc_stateless_multi_op_sample.ko $(SAMPLE_BUILD_OUTPUT)/; + endif + + BUILD_SYN=algchaining_sample ccm_sample cipher_sample \ +@@ -154,86 +149,65 @@ sym:$(BUILD_SYN) + @echo ; echo "Build sym component"; + algchaining_sample: output_dir + @cd $(SYM_PATH)/alg_chaining_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(SYM_PATH)/alg_chaining_sample/algchaining_sample $(SAMPLE_BUILD_OUTPUT)/; + ifneq ($(WITH_UPSTREAM),1) + @cd $(SYM_PATH)/alg_chaining_sample && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(SYM_PATH)/alg_chaining_sample/algchaining_sample.ko $(SAMPLE_BUILD_OUTPUT)/; + endif + + ccm_sample: output_dir + @cd $(SYM_PATH)/ccm_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(SYM_PATH)/ccm_sample/ccm_sample $(SAMPLE_BUILD_OUTPUT)/; + ifneq ($(WITH_UPSTREAM),1) + @cd $(SYM_PATH)/ccm_sample && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(SYM_PATH)/ccm_sample/ccm_sample.ko $(SAMPLE_BUILD_OUTPUT)/; + endif + + cipher_sample: output_dir + @cd $(SYM_PATH)/cipher_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(SYM_PATH)/cipher_sample/cipher_sample $(SAMPLE_BUILD_OUTPUT)/; + ifneq ($(WITH_UPSTREAM),1) + @cd $(SYM_PATH)/cipher_sample && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(SYM_PATH)/cipher_sample/cipher_sample.ko $(SAMPLE_BUILD_OUTPUT)/; + endif + + drbg_sample: output_dir + @cd $(SYM_PATH)/drbg_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(SYM_PATH)/drbg_sample/drbg_sample $(SAMPLE_BUILD_OUTPUT)/; + ifneq ($(WITH_UPSTREAM),1) + @cd $(SYM_PATH)/drbg_sample && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(SYM_PATH)/drbg_sample/drbg_sample.ko $(SAMPLE_BUILD_OUTPUT)/; + endif + + gcm_sample: output_dir + @cd $(SYM_PATH)/gcm_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(SYM_PATH)/gcm_sample/gcm_sample $(SAMPLE_BUILD_OUTPUT)/; + ifneq ($(WITH_UPSTREAM),1) + @cd $(SYM_PATH)/gcm_sample && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(SYM_PATH)/gcm_sample/gcm_sample.ko $(SAMPLE_BUILD_OUTPUT)/; + endif + + hash_file_sample: output_dir + @cd $(SYM_PATH)/hash_file_sample && $(MAKE) clean ICP_OS_LEVEL=user_space&& $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(SYM_PATH)/hash_file_sample/hash_file_sample $(SAMPLE_BUILD_OUTPUT)/; + + hash_sample: output_dir + @cd $(SYM_PATH)/hash_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(SYM_PATH)/hash_sample/hash_sample $(SAMPLE_BUILD_OUTPUT)/; + ifneq ($(WITH_UPSTREAM),1) + @cd $(SYM_PATH)/hash_sample && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(SYM_PATH)/hash_sample/hash_sample.ko $(SAMPLE_BUILD_OUTPUT)/; + endif + + ipsec_sample: output_dir + @cd $(SYM_PATH)/ipsec_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(SYM_PATH)/ipsec_sample/ipsec_sample $(SAMPLE_BUILD_OUTPUT)/; + ifneq ($(WITH_UPSTREAM),1) + @cd $(SYM_PATH)/ipsec_sample && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(SYM_PATH)/ipsec_sample/ipsec_sample.ko $(SAMPLE_BUILD_OUTPUT)/; + endif + + nrbg_sample: output_dir + @cd $(SYM_PATH)/nrbg_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(SYM_PATH)/nrbg_sample/nrbg_sample $(SAMPLE_BUILD_OUTPUT)/; + ifneq ($(WITH_UPSTREAM),1) + @cd $(SYM_PATH)/nrbg_sample && $(MAKE) && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(SYM_PATH)/nrbg_sample/nrbg_sample.ko $(SAMPLE_BUILD_OUTPUT)/; + endif + + ssl_sample: output_dir + @cd $(SYM_PATH)/ssl_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(SYM_PATH)/ssl_sample/ssl_sample $(SAMPLE_BUILD_OUTPUT)/; + ifneq ($(WITH_UPSTREAM),1) + @cd $(SYM_PATH)/ssl_sample && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(SYM_PATH)/ssl_sample/ssl_sample.ko $(SAMPLE_BUILD_OUTPUT)/; + endif + + sym_dp_sample: output_dir + @cd $(SYM_PATH)/symdp_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(SYM_PATH)/symdp_sample/sym_dp_sample $(SAMPLE_BUILD_OUTPUT)/; + ifneq ($(WITH_UPSTREAM),1) + @cd $(SYM_PATH)/symdp_sample && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(SYM_PATH)/symdp_sample/sym_dp_sample.ko $(SAMPLE_BUILD_OUTPUT)/; + endif + + BUILD_ASYM=diffie_hellman_sample prime_sample +@@ -243,18 +217,52 @@ asym: $(BUILD_ASYM) + + diffie_hellman_sample: output_dir + @cd $(ASYM_PATH)/diffie_hellman_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(ASYM_PATH)/diffie_hellman_sample/dh_sample $(SAMPLE_BUILD_OUTPUT)/; + ifneq ($(WITH_UPSTREAM),1) + @cd $(ASYM_PATH)/diffie_hellman_sample && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(ASYM_PATH)/diffie_hellman_sample/dh_sample.ko $(SAMPLE_BUILD_OUTPUT)/; + endif + + prime_sample: output_dir + @cd $(ASYM_PATH)/prime_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space +- @cp $(ASYM_PATH)/prime_sample/prime_sample $(SAMPLE_BUILD_OUTPUT)/; + ifneq ($(WITH_UPSTREAM),1) + @cd $(ASYM_PATH)/prime_sample && $(MAKE) ICP_OS_LEVEL=kernel_space +- @cp $(ASYM_PATH)/prime_sample/prime_sample.ko $(SAMPLE_BUILD_OUTPUT)/; ++endif ++ ++install: output_dir ++ @cp $(DC_PATH)/stateless_multi_op_checksum_sample/dc_stateless_multi_op_sample $(BIN_INSTALLPATH); ++ @cp $(DC_PATH)/stateful_sample/dc_stateful_sample $(BIN_INSTALLPATH); ++ @cp $(DC_PATH)/stateful_sample/paper4 $(BIN_INSTALLPATH); ++ @cp $(DC_PATH)/dc_dp_sample/dc_dp_sample $(BIN_INSTALLPATH); ++ @cp $(DC_PATH)/stateless_sample/dc_stateless_sample $(BIN_INSTALLPATH); ++ @cp $(ASYM_PATH)/prime_sample/prime_sample $(BIN_INSTALLPATH); ++ @cp $(ASYM_PATH)/diffie_hellman_sample/dh_sample $(BIN_INSTALLPATH); ++ @cp $(SYM_PATH)/symdp_sample/sym_dp_sample $(BIN_INSTALLPATH); ++ @cp $(SYM_PATH)/ssl_sample/ssl_sample $(BIN_INSTALLPATH); ++ @cp $(SYM_PATH)/nrbg_sample/nrbg_sample $(BIN_INSTALLPATH); ++ @cp $(SYM_PATH)/hash_file_sample/hash_file_sample $(BIN_INSTALLPATH); ++ @cp $(SYM_PATH)/ipsec_sample/ipsec_sample $(BIN_INSTALLPATH); ++ @cp $(SYM_PATH)/hash_sample/hash_sample $(BIN_INSTALLPATH); ++ @cp $(SYM_PATH)/gcm_sample/gcm_sample $(BIN_INSTALLPATH); ++ @cp $(SYM_PATH)/alg_chaining_sample/algchaining_sample $(BIN_INSTALLPATH); ++ @cp $(SYM_PATH)/ccm_sample/ccm_sample $(BIN_INSTALLPATH); ++ @cp $(SYM_PATH)/drbg_sample/drbg_sample $(BIN_INSTALLPATH); ++ @cp $(SYM_PATH)/cipher_sample/cipher_sample $(BIN_INSTALLPATH); ++ ++ifneq ($(WITH_UPSTREAM),1) ++ @cp $(DC_PATH)/stateless_multi_op_checksum_sample/dc_stateless_multi_op_sample.ko $(MODULE_INSTALLPATH); ++ @cp $(DC_PATH)/dc_dp_sample/dc_dp_sample.ko $(MODULE_INSTALLPATH); ++ @cp $(DC_PATH)/stateless_sample/dc_stateless_sample.ko $(MODULE_INSTALLPATH); ++ @cp $(ASYM_PATH)/prime_sample/prime_sample.ko $(MODULE_INSTALLPATH); ++ @cp $(ASYM_PATH)/diffie_hellman_sample/dh_sample.ko $(MODULE_INSTALLPATH); ++ @cp $(SYM_PATH)/symdp_sample/sym_dp_sample.ko $(MODULE_INSTALLPATH); ++ @cp $(SYM_PATH)/ssl_sample/ssl_sample.ko $(MODULE_INSTALLPATH); ++ @cp $(SYM_PATH)/nrbg_sample/nrbg_sample.ko $(MODULE_INSTALLPATH); ++ @cp $(SYM_PATH)/ipsec_sample/ipsec_sample.ko $(MODULE_INSTALLPATH); ++ @cp $(SYM_PATH)/hash_sample/hash_sample.ko $(MODULE_INSTALLPATH); ++ @cp $(SYM_PATH)/gcm_sample/gcm_sample.ko $(MODULE_INSTALLPATH); ++ @cp $(SYM_PATH)/alg_chaining_sample/algchaining_sample.ko $(MODULE_INSTALLPATH); ++ @cp $(SYM_PATH)/ccm_sample/ccm_sample.ko $(MODULE_INSTALLPATH); ++ @cp $(SYM_PATH)/drbg_sample/drbg_sample.ko $(MODULE_INSTALLPATH); ++ @cp $(SYM_PATH)/cipher_sample/cipher_sample.ko $(MODULE_INSTALLPATH); + endif + + CLEAN_DC=clean_dc_dp_sample clean_stateless_sample \ +-- +1.9.1 + diff --git a/meta-qat/recipes-extended/qat/qat16/qat16_2.6.0-65-qat-override-CC-LD-AR-only-when-it-is-not-define.patch b/meta-qat/recipes-extended/qat/qat16/qat16_2.6.0-65-qat-override-CC-LD-AR-only-when-it-is-not-define.patch new file mode 100644 index 00000000..21cdeaee --- /dev/null +++ b/meta-qat/recipes-extended/qat/qat16/qat16_2.6.0-65-qat-override-CC-LD-AR-only-when-it-is-not-define.patch @@ -0,0 +1,35 @@ +From b21929c42aca4bc80f6c48b5ac31bf20165b2f3e Mon Sep 17 00:00:00 2001 +From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> +Date: Fri, 25 Mar 2016 18:02:37 +0800 +Subject: [PATCH] qat: override CC LD AR only when it is not define + +Upstream-Status: Inappropriate [Configuration] + +To make sure that compiler linker and archiver will override only when +it is not defined by the environment. + +Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> +--- + quickassist/build_system/build_files/Core/ia.mk | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/quickassist/build_system/build_files/Core/ia.mk b/quickassist/build_system/build_files/Core/ia.mk +index 4a4d123..f9aca23 100755 +--- a/quickassist/build_system/build_files/Core/ia.mk ++++ b/quickassist/build_system/build_files/Core/ia.mk +@@ -67,9 +67,9 @@ + # e.g. setenv CROSS_COMPILE x86_64-linux + ifdef CROSS_COMPILE + ifdef MACHINE +-CC = $(CROSS_COMPILE)gcc +-LD = $(CROSS_COMPILE)ld +-AR = $(CROSS_COMPILE)ar ++CC ?= $(CROSS_COMPILE)gcc ++LD ?= $(CROSS_COMPILE)ld ++AR ?= $(CROSS_COMPILE)ar + else + $(error MACHINE is undefined. Please set your target i.e. x86_64 \ + "-> setenv MACHINE x86_64 or export MACHINE=x86_64") +-- +1.9.1 + diff --git a/meta-qat/recipes-extended/qat/qat16/use-CC-for-LD.patch b/meta-qat/recipes-extended/qat/qat16/use-CC-for-LD.patch new file mode 100644 index 00000000..36ceedf4 --- /dev/null +++ b/meta-qat/recipes-extended/qat/qat16/use-CC-for-LD.patch @@ -0,0 +1,17 @@ +Use CC to do the linking, helps in linking with gold or bfd linker + +Upstream-Status: Inappropriate [OE-Specific] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Index: QAT1.6/quickassist/build_system/build_files/OS/linux_2.6.mk +=================================================================== +--- QAT1.6.orig/quickassist/build_system/build_files/OS/linux_2.6.mk ++++ QAT1.6/quickassist/build_system/build_files/OS/linux_2.6.mk +@@ -89,7 +89,7 @@ EXTRA_CFLAGS+= -Wno-div-by-zero -Wfloat- + endif + + +-LIB_SHARED_FLAGS+=-shared -soname $(LIB_SHARED) ++LIB_SHARED_FLAGS+=-shared -Wl,-soname,$(LIB_SHARED) + LIB_STATIC_FLAGS= + EXE_FLAGS?= + diff --git a/meta-qat/recipes-extended/qat/qat16_2.5.0-80.bb b/meta-qat/recipes-extended/qat/qat16_2.5.0-80.bb new file mode 100644 index 00000000..46d81fbc --- /dev/null +++ b/meta-qat/recipes-extended/qat/qat16_2.5.0-80.bb @@ -0,0 +1,12 @@ +include qat16.inc + +SRC_URI += "https://01.org/sites/default/files/page/qatmux.l.${PV}.tgz;name=qat \ + file://qat16_2.5.0-80-qat-add-install-target-to-makefiles.patch \ + " + +SRC_URI[qat.md5sum] = "e3c2ceeec7ed8b36d75682742caff81e" +SRC_URI[qat.sha256sum] = "e9e47cd9cbd98c2ceac5cc31570e443680649be682068126df6d749120a3697d" + +do_install_append() { + install -m 0755 ${SAMPLE_CODE_DIR}/performance/compression/calgary32 ${D}${base_libdir}/firmware +} diff --git a/meta-qat/recipes-extended/qat/qat16_2.6.0-65.bb b/meta-qat/recipes-extended/qat/qat16_2.6.0-65.bb new file mode 100644 index 00000000..88cf66c3 --- /dev/null +++ b/meta-qat/recipes-extended/qat/qat16_2.6.0-65.bb @@ -0,0 +1,16 @@ +include qat16.inc + +SRC_URI += "https://01.org/sites/default/files/page/qatmux.l.2.6.0-60.tgz;name=qat \ + file://qat16_2.6.0-65-qat-add-install-target-to-makefiles.patch \ + file://qat16_2.6.0-65-qat-override-CC-LD-AR-only-when-it-is-not-define.patch \ + file://use-CC-for-LD.patch \ + " + +SRC_URI_append_libc-musl = " file://0001-OsalServices-Only-use-bits-time-with-GLIBC.patch" + +SRC_URI[qat.md5sum] = "c54e877fb9fbb4690a9bd50793268bcf" +SRC_URI[qat.sha256sum] = "872046ffdf02f664d12a56cdb880403d65b914b303b75875707a9eebd9c841f5" + +do_install_append() { + install -m 0755 ${SAMPLE_CODE_DIR}/performance/compression/calgary32 ${D}${base_libdir}/firmware +} diff --git a/meta-qat/recipes-extended/zlib-qat/zlib-qat/0001-qat_zlib.h-Add-pthread.h-for-MUSL.patch b/meta-qat/recipes-extended/zlib-qat/zlib-qat/0001-qat_zlib.h-Add-pthread.h-for-MUSL.patch new file mode 100644 index 00000000..b45ae794 --- /dev/null +++ b/meta-qat/recipes-extended/zlib-qat/zlib-qat/0001-qat_zlib.h-Add-pthread.h-for-MUSL.patch @@ -0,0 +1,29 @@ +From 30c4a1181cbe696dd1b9f52c8e9422ef8c331e8f Mon Sep 17 00:00:00 2001 +From: Saul Wold <sgw@linux.intel.com> +Date: Thu, 9 Feb 2017 12:40:47 -0800 +Subject: [PATCH] qat_zlib.h: Add pthread.h for MUSL + +MUSL is stricter when it comes to header file inclusion, so add +the additional header thats needed to compile with MUSL. + +Upstream-Status: Pending +Signed-off-by: Saul Wold <sgw@linux.intel.com> +--- + qat_zlib.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/qat_zlib.h b/qat_zlib.h +index 2747f84..d9ac312 100644 +--- a/qat_zlib.h ++++ b/qat_zlib.h +@@ -8,6 +8,7 @@ + #include <stdlib.h> + #include <assert.h> + #include <time.h> ++#include <pthread.h> + + #include "cpa_dc.h" + #ifdef USE_QAE_MEM +-- +2.7.4 + diff --git a/meta-qat/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-qat_mem-build-qat_mem-ko-against-yocto-kernel-src.patch b/meta-qat/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-qat_mem-build-qat_mem-ko-against-yocto-kernel-src.patch new file mode 100644 index 00000000..9e774db2 --- /dev/null +++ b/meta-qat/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-qat_mem-build-qat_mem-ko-against-yocto-kernel-src.patch @@ -0,0 +1,51 @@ +From aa65d69632142d24ec44ed4c2d66371e1a1be7b4 Mon Sep 17 00:00:00 2001 +From: Anuj Mittal <anujx.mittal@intel.com> +Date: Thu, 18 Jun 2015 11:56:08 +0800 +Subject: [PATCH] qat_mem: build qat_mem ko against yocto kernel src + +Upstream-Status: Inappropriate [Configuration] + +This tweaks the kernel source and build path in the makefile +to make sure the module is built against the right source. + +Signed-off-by: Anuj Mittal <anujx.mittal@intel.com> +--- + contrib/qat/qat_mem/Makefile | 13 +++++-------- + 1 file changed, 5 insertions(+), 8 deletions(-) + +diff --git a/contrib/qat/qat_mem/Makefile b/contrib/qat/qat_mem/Makefile +index ddf5b59..ad6d4a4 100644 +--- a/contrib/qat/qat_mem/Makefile ++++ b/contrib/qat/qat_mem/Makefile +@@ -61,16 +61,10 @@ + ######################################################################### + + MODULENAME := qat_mem +-KDIR := /lib/modules/$(shell uname -r)/build ++KDIR := $(KERNEL_SOURCE_ROOT) + PWD := $(shell pwd) + +-ifeq ($(shell uname -r|grep -c grsec-WR), 1) +-AUTO_CONF=/lib/modules/$(shell uname -r)/build/include/generated/autoconf.h +-else +-AUTO_CONF=/usr/src/kernels/$(shell uname -r)/include/linux/autoconf.h +-endif +- +-CC := gcc -Wall -imacros $(AUTO_CONF) ++CC := ${CC} -Wall -imacros $(KERNEL_BUILDDIR)/include/generated/autoconf.h + + ifeq ($(KERNELRELEASE),) + all: $(MODULENAME)_test +@@ -80,6 +74,9 @@ else + obj-m := $(MODULENAME).o + endif + ++modules_install: ++ $(MAKE) -C $(KDIR) M=$(PWD) modules_install ++ + $(MODULENAME)_test: $(MODULENAME)_test.c + $(CC) -g -o $(MODULENAME)_test $(MODULENAME)_test.c + +-- +1.7.9.5 + diff --git a/meta-qat/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch b/meta-qat/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch new file mode 100644 index 00000000..c3605112 --- /dev/null +++ b/meta-qat/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch @@ -0,0 +1,52 @@ +From aad2675c7bb635d8b7be47fa89a3ee87ba19d2e8 Mon Sep 17 00:00:00 2001 +From: Anuj Mittal <anujx.mittal@intel.com> +Date: Thu, 18 Jun 2015 11:46:17 +0800 +Subject: [PATCH] zlib: Remove rpaths from makefile + +Upstream-Status: Inappropriate [configuration] + +This removes references to RPATHS that are no longer +necesary when building using bitbake. + +Signed-off-by: Anuj Mittal <anujx.mittal@intel.com> +--- + Makefile.in | 4 ++-- + contrib/qat/qat_zlib_test/Makefile | 3 --- + 2 files changed, 2 insertions(+), 5 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index 94d8a80..cba5291 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -59,12 +59,12 @@ ICP_LAC_API_DIR=$(ICP_API_DIR)/lac/ + ICP_DC_API_DIR=$(ICP_API_DIR)/dc/ + CFLAGS+=-D_GNU_SOURCE -I$(ICP_API_DIR) -I$(ICP_DC_API_DIR) -I$(ICP_LAC_API_DIR) -I$(ICP_SAL_API_DIR) + SFLAGS+=-D_GNU_SOURCE -I$(ICP_API_DIR) -I$(ICP_DC_API_DIR) -I$(ICP_LAC_API_DIR) -I$(ICP_SAL_API_DIR) +-ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(ZLIB_ROOT) -lz ++#ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(ZLIB_ROOT) -lz + SHARED_APP_FLAGS=-Wl,-rpath,$(ZLIB_ROOT) -L$(ZLIB_ROOT) -lz + + ifdef ICP_BUILD_OUTPUT + TEST_LDFLAGS+=-L$(ICP_BUILD_OUTPUT) +- ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(ICP_BUILD_OUTPUT) -L$(ICP_BUILD_OUTPUT) ++# ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(ICP_BUILD_OUTPUT) -L$(ICP_BUILD_OUTPUT) + endif + + ifdef ZLIB_DH895XCC +diff --git a/contrib/qat/qat_zlib_test/Makefile b/contrib/qat/qat_zlib_test/Makefile +index 8a29a92..ca31dd2 100644 +--- a/contrib/qat/qat_zlib_test/Makefile ++++ b/contrib/qat/qat_zlib_test/Makefile +@@ -84,9 +84,6 @@ OBJS = $(SRCS:%.c=%.o) + COVERAGE_OBJS = + EXE= + LIBQAT= +-ifdef ICP_BUILD_OUTPUT +- LIBQAT+= -Wl,-rpath,$(ICP_BUILD_OUTPUT) -L$(ICP_BUILD_OUTPUT) +-endif + + DRIVER=icp_qa_al + ifdef WITH_CPA_MUX +-- +1.7.9.5 + diff --git a/meta-qat/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-qat-add-a-install-target-to-makefile.patch b/meta-qat/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-qat-add-a-install-target-to-makefile.patch new file mode 100644 index 00000000..c7aec55a --- /dev/null +++ b/meta-qat/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-qat-add-a-install-target-to-makefile.patch @@ -0,0 +1,46 @@ +From d78121d790c4a248bc47d1c662791fe57ac4af38 Mon Sep 17 00:00:00 2001 +From: Anuj Mittal <anujx.mittal@intel.com> +Date: Thu, 18 Jun 2015 11:53:23 +0800 +Subject: [PATCH] zlib-qat: add a install target to makefile + +Upstream-Status: Inappropriate [Configuration] + +This adds an install target to qat_zlib_test and qat_mem makefiles +to facilitate the installation of test binaries to {D}. + +Signed-off-by: Anuj Mittal <anujx.mittal@intel.com> +--- + contrib/qat/qat_mem/Makefile | 3 +++ + contrib/qat/qat_zlib_test/Makefile | 3 +++ + 2 files changed, 6 insertions(+) + +diff --git a/contrib/qat/qat_mem/Makefile b/contrib/qat/qat_mem/Makefile +index ad6d4a4..e4d77b6 100644 +--- a/contrib/qat/qat_mem/Makefile ++++ b/contrib/qat/qat_mem/Makefile +@@ -74,6 +74,9 @@ else + obj-m := $(MODULENAME).o + endif + ++install: modules_install ++ cp qat_mem_test $(INSTALL_MOD_PATH)$(bindir) ++ + modules_install: + $(MAKE) -C $(KDIR) M=$(PWD) modules_install + +diff --git a/contrib/qat/qat_zlib_test/Makefile b/contrib/qat/qat_zlib_test/Makefile +index ca31dd2..7da5ddd 100644 +--- a/contrib/qat/qat_zlib_test/Makefile ++++ b/contrib/qat/qat_zlib_test/Makefile +@@ -112,5 +112,8 @@ comptestappsh$(EXE): $(OBJS) Makefile + $(CC) -o comptestappsh $(OBJS) $(COVERAGE) \ + $(SHAREDLIBQAT) + ++install: ++ cp comptestapp $(DESTDIR)$(bindir) ++ + clean: + rm -f $(OBJS) $(COVERAGE_OBJS) comptestapp comptestappsh +-- +1.7.9.5 + diff --git a/meta-qat/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb b/meta-qat/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb new file mode 100644 index 00000000..90e036f7 --- /dev/null +++ b/meta-qat/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb @@ -0,0 +1,133 @@ +SUMMARY = "Zlib QAT_MEM Memory Management Module for Intel Quick Assist \ +Technology" + +DESCRIPTION = "This software acelerates the data compression algorithm \ +in the zlib software library via the Intel QuickAssist Technology \ +implemented on Intel Communications Chipset 89xx and 895x Series based platforms." + +HOMEPAGE = "http://zlib.net/" +SECTION = "libs" +LICENSE = "Zlib & GPLv2 & BSD" +LIC_FILES_CHKSUM = "file://${WORKDIR}/zlib-${ZLIB_VERSION}/zlib.h;beginline=4;endline=23;md5=fde612df1e5933c428b73844a0c494fd \ + file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 \ + file://${COMMON_LICENSE_DIR}/BSD;md5=3775480a712fc46a69647678acb234cb" + +# For target side versions of openssl enable support for OCF Linux driver +# if they are available. +DEPENDS += "cryptodev-linux pkgconfig virtual/qat" + +SRC_URI = "http://www.zlib.net/zlib-${ZLIB_VERSION}.tar.gz;name=zlib \ + https://01.org/sites/default/files/page/zlib_shim_0.4.7-002_withdocumentation.zip;name=zlibqat \ + file://zlib-qat-0.4.7-002-qat_mem-build-qat_mem-ko-against-yocto-kernel-src.patch \ + file://zlib-qat-0.4.7-002-zlib-qat-add-a-install-target-to-makefile.patch \ + file://zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch \ + " +SRC_URI_append_libc-musl = " file://0001-qat_zlib.h-Add-pthread.h-for-MUSL.patch" + +SRC_URI[zlib.md5sum] = "44d667c142d7cda120332623eab69f40" +SRC_URI[zlib.sha256sum] = "36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d" + +SRC_URI[zlibqat.md5sum] = "dfde8618198aa8d35ecc00d10dcc7000" +SRC_URI[zlibqat.sha256sum] = "8e5786400bbc2a879ae705c864ec63b53ae019b4f2d1c94524a97223847b6e46" + +COMPATIBLE_MACHINE = "null" + +ZLIB_VERSION = "1.2.8" +ZLIB_QAT_VERSION = "0.4.7-002" +QAT_PATCH_VERSION = "l.0.4.7_002" + +S = "${WORKDIR}/zlib-${ZLIB_VERSION}" + +export ICP_ROOT = "${S}" +export ZLIB_ROOT = "${S}" +export KERNEL_SOURCE_ROOT = "${STAGING_KERNEL_DIR}" +export KERNEL_BUILDDIR = "${STAGING_KERNEL_BUILDDIR}" +export ICP_LAC_API_DIR = "${STAGING_DIR_TARGET}${includedir}/lac" +export ICP_DC_API_DIR = "${STAGING_DIR_TARGET}${includedir}/dc" +export ZLIB_DH895XCC = "1" +export ZLIB_MEMORY_DRIVER = "qat_mem" +export ICP_BUILD_OUTPUT = "${STAGING_DIR_TARGET}" +EXTRA_OEMAKE = "-e MAKEFLAGS=" +TARGET_CC_ARCH += "${LDFLAGS}" + +inherit module +MEM_PATH = "${S}/contrib/qat" + +zlibqat_do_patch() { + cd ${WORKDIR} + unzip -q -o zlib_quickassist_patch_${QAT_PATCH_VERSION}_stable.zip + cd zlib_quickassist_patch_${QAT_PATCH_VERSION}_devbranch + tar -xvzf zlib-${ZLIB_VERSION}-qat.L.${ZLIB_QAT_VERSION}.tar.gz + cp -f zlib-${ZLIB_VERSION}-qat.patch ${WORKDIR} + cd ${S} + if [ ! -d ${S}/debian/patches ]; then + mkdir -p ${S}/debian/patches + cp -f ${WORKDIR}/zlib-${ZLIB_VERSION}-qat.patch ${S}/debian/patches + echo "zlib-${ZLIB_VERSION}-qat.patch -p1" > ${S}/debian/patches/series + fi + quilt pop -a || true + if [ -d ${S}/.pc-zlibqat ]; then + rm -rf ${S}/.pc + mv ${S}/.pc-zlibqat ${S}/.pc + QUILT_PATCHES=${S}/debian/patches quilt pop -a + rm -rf ${S}/.pc + fi + QUILT_PATCHES=${S}/debian/patches quilt push -a + mv ${S}/.pc ${S}/.pc-zlibqat +} + +# We invoke base do_patch at end, to incorporate any local patch +python do_patch() { + bb.build.exec_func('zlibqat_do_patch', d) + bb.build.exec_func('patch_do_patch', d) +} + +#addtask zlibqat_patch after do_prepare_recipe_sysroot before patch_do_patch +#addtask do_zlibqat_patch after do_prepare_recipe_sysroot before do_configure + +do_configure() { + ./configure --prefix=${prefix} --shared --libdir=${libdir} +} + +do_compile() { + unset CFLAGS CXXFLAGS + oe_runmake + + cd ${S}/contrib/qat/qat_mem + oe_runmake + + cd ${S}/contrib/qat/qat_zlib_test + oe_runmake +} + +do_install() { + install -m 0755 -d ${D}${bindir}/ + install -m 0755 -d ${D}${sysconfdir}/zlib_conf/ + + install -m 0755 zpipe ${D}${bindir} + install -m 0755 minigzip ${D}${bindir} + + cd ${MEM_PATH}/qat_mem + oe_runmake INSTALL_MOD_PATH=${D} INSTALL_MOD_DIR="kernel/drivers" install + + cd ${S}/contrib/qat/qat_zlib_test + oe_runmake DESTDIR=${D} install + + install -m 660 ${MEM_PATH}/config/dh895xcc/multi_thread_optimized/* ${D}${sysconfdir}/zlib_conf/ +} + +PACKAGES += "${PN}-app" + +FILES_${PN} += " \ + ${sysconfdir}/zlib_conf/ \ + " + +FILES_${PN}-app += " \ + ${bindir}/* \ + " + +FILES_${PN}-dbg += " \ + ${bindir}/.debug \ + " + +EXCLUDE_FROM_WORLD_core2-32-intel-common = "1" diff --git a/meta-tlk/COPYING.MIT b/meta-tlk/COPYING.MIT new file mode 100644 index 00000000..fb950dc6 --- /dev/null +++ b/meta-tlk/COPYING.MIT @@ -0,0 +1,17 @@ +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/meta-tlk/README b/meta-tlk/README new file mode 100644 index 00000000..07cbd76e --- /dev/null +++ b/meta-tlk/README @@ -0,0 +1,9 @@ +meta-tlk +======== + +This layer makes the appropriate kernel modifications to enable a 10 day +time limit in the official BSP images produced using the Yocto Project +autobuilder, in order to encourage people to produce their own images +for production whilst still allowing the images to be useful for testing +and debugging. + diff --git a/meta-tlk/conf/layer.conf b/meta-tlk/conf/layer.conf new file mode 100644 index 00000000..dea544fd --- /dev/null +++ b/meta-tlk/conf/layer.conf @@ -0,0 +1,13 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "tlk" +BBFILE_PATTERN_tlk := "^${LAYERDIR}/" +BBFILE_PRIORITY_tlk = "5" + +LAYERDEPENDS_tlk = "core intel" + diff --git a/meta-tlk/recipes-core/base-files/base-files_3.0.14.bbappend b/meta-tlk/recipes-core/base-files/base-files_3.0.14.bbappend new file mode 100644 index 00000000..81fe7b79 --- /dev/null +++ b/meta-tlk/recipes-core/base-files/base-files_3.0.14.bbappend @@ -0,0 +1 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" diff --git a/meta-tlk/recipes-core/base-files/files/motd b/meta-tlk/recipes-core/base-files/files/motd new file mode 100644 index 00000000..13cd74c7 --- /dev/null +++ b/meta-tlk/recipes-core/base-files/files/motd @@ -0,0 +1,7 @@ +This image contains a time limited kernel and will reboot the machine +automatically in 10 days. Do not include this image in a product. + +Use the image for evaluation purposes only. + +Please see http://www.yoctoproject.org/tlk for instructions on how to +eliminate the timeout. diff --git a/meta-tlk/recipes-core/psplash/files/psplash-tlk.png b/meta-tlk/recipes-core/psplash/files/psplash-tlk.png Binary files differnew file mode 100644 index 00000000..54b8fae7 --- /dev/null +++ b/meta-tlk/recipes-core/psplash/files/psplash-tlk.png diff --git a/meta-tlk/recipes-core/psplash/psplash_git.bbappend b/meta-tlk/recipes-core/psplash/psplash_git.bbappend new file mode 100644 index 00000000..176a299e --- /dev/null +++ b/meta-tlk/recipes-core/psplash/psplash_git.bbappend @@ -0,0 +1,6 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +# NB: this is only for the main logo image; if you add multiple images here, +# poky will build multiple psplash packages with 'outsuffix' in name for +# each of these ... +SPLASH_IMAGES = "file://psplash-tlk.png;outsuffix=default" diff --git a/meta-tlk/recipes-kernel/linux/files/time-limited-kernel.cfg b/meta-tlk/recipes-kernel/linux/files/time-limited-kernel.cfg new file mode 100644 index 00000000..44f4beaa --- /dev/null +++ b/meta-tlk/recipes-kernel/linux/files/time-limited-kernel.cfg @@ -0,0 +1,3 @@ +CONFIG_UPTIME_LIMITED_KERNEL=y +CONFIG_UPTIME_LIMIT_DURATION=14400 +CONFIG_UPTIME_LIMIT_KERNEL_REBOOT=y diff --git a/meta-tlk/recipes-kernel/linux/files/uptime-allow-the-optional-limiting-of-kernel-runtime.patch b/meta-tlk/recipes-kernel/linux/files/uptime-allow-the-optional-limiting-of-kernel-runtime.patch new file mode 100644 index 00000000..aa143059 --- /dev/null +++ b/meta-tlk/recipes-kernel/linux/files/uptime-allow-the-optional-limiting-of-kernel-runtime.patch @@ -0,0 +1,251 @@ +From a21e483b57c8c31beaa5063268ec35da375daf04 Mon Sep 17 00:00:00 2001 +From: Bruce Ashfield <bruce.ashfield@windriver.com> +Date: Tue, 12 Jul 2011 10:26:50 -0400 +Subject: [PATCH] uptime: allow the optional limiting of kernel runtime + +Introduce the ability to limit the limit the uptime of a kernel. +When enabled, these options set a maximum uptime on the kernel, and +(optionally) trigger a clean reboot at expiration. + +This functionality may appear to be very close to the softdog watchdog +implementation. It is. But can't be the softdog for several reasons: + + - The soft watchdog should be available while this functionality is active + - The duration range is different between this and the softdog. The + timeout available here is potentially quite a bit longer. + - At expiration, there are different expiration requirements and actions. + - This functionality is specific to a particular use case and should + not impact mainline functionality + +To cleanly restart the kernel after one minute of uptime, the following +config items would be required: + + CONFIG_UPTIME_LIMITED_KERNEL=y + CONFIG_UPTIME_LIMIT_DURATION=1 + CONFIG_UPTIME_LIMIT_KERNEL_REBOOT=y + +Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> + +diff --git a/init/Kconfig b/init/Kconfig +index cac3f096050d..77d6d5fa1b1d 100644 +--- a/init/Kconfig ++++ b/init/Kconfig +@@ -1376,6 +1376,31 @@ menuconfig EXPERT + environments which can tolerate a "non-standard" kernel. + Only use this if you really know what you are doing. + ++config UPTIME_LIMITED_KERNEL ++ bool "Create a kernel with uptime limitations" ++ default n ++ help ++ Limit the amount of time a kernel can run. The associated UPTIME_LIMIT* ++ kernel config options should be used to tune the behaviour. ++ ++config UPTIME_LIMIT_DURATION ++ int "Kernel uptime limit in minutes" ++ depends on UPTIME_LIMITED_KERNEL ++ range 0 14400 ++ default 0 ++ help ++ Define the uptime limitation on a kernel in minutes. Once ++ the defined time expires the kernel will emit a warning, cease ++ to be usable and eventually restart. The valid range is 0 (disable) ++ to 14400 (10 days) ++ ++config UPTIME_LIMIT_KERNEL_REBOOT ++ bool "Reboot a time limited kernel at expiration" ++ depends on UPTIME_LIMITED_KERNEL ++ default y ++ help ++ Reboot an uptime limited kernel at expiration. ++ + config UID16 + bool "Enable 16-bit UID system calls" if EXPERT + depends on HAVE_UID16 && MULTIUSER +diff --git a/kernel/Makefile b/kernel/Makefile +index e2ec54e2b952..6b7bdddd624b 100644 +--- a/kernel/Makefile ++++ b/kernel/Makefile +@@ -45,6 +45,7 @@ obj-$(CONFIG_FREEZER) += freezer.o + obj-$(CONFIG_PROFILING) += profile.o + obj-$(CONFIG_STACKTRACE) += stacktrace.o + obj-y += time/ ++obj-$(CONFIG_UPTIME_LIMITED_KERNEL) += uptime_limit.o + obj-$(CONFIG_FUTEX) += futex.o + ifeq ($(CONFIG_COMPAT),y) + obj-$(CONFIG_FUTEX) += futex_compat.o +diff --git a/kernel/uptime_limit.c b/kernel/uptime_limit.c +new file mode 100644 +index 000000000000..b6a1a5e4f9d9 +--- /dev/null ++++ b/kernel/uptime_limit.c +@@ -0,0 +1,166 @@ ++/* ++ * uptime_limit.c ++ * ++ * This file contains the functions which can limit kernel uptime ++ * ++ * Copyright (C) 2011 Bruce Ashfield (bruce.ashfield@windriver.com) ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ * ++ * ++ * This functionality is somewhat close to the softdog watchdog ++ * implementation, but it cannot be used directly for several reasons: ++ * ++ * - The soft watchdog should be available while this functionality is active ++ * - The duration range is different between this and the softdog. The ++ * timeout available here is potentially quite a bit longer. ++ * - At expiration, there are different expiration requirements and actions. ++ * - This functionality is specific to a particular use case and should ++ * not impact mainline functionality ++ * ++ */ ++#include <linux/kernel.h> ++#include <linux/reboot.h> ++#include <linux/timer.h> ++#include <linux/delay.h> ++#include <linux/kthread.h> ++ ++#define UPTIME_LIMIT_IN_SECONDS (CONFIG_UPTIME_LIMIT_DURATION * 60) ++#define MIN(X, Y) ((X) <= (Y) ? (X) : (Y)) ++#define TEN_MINUTES_IN_SECONDS 600 ++ ++enum uptime_expiration_type { ++ uptime_no_action, ++ uptime_reboot ++}; ++ ++static enum uptime_expiration_type uptime_expiration_action = uptime_no_action; ++static struct timer_list timelimit_timer; ++static struct task_struct *uptime_worker_task; ++ ++static void timelimit_expire(unsigned long timeout_seconds) ++{ ++ char msg[128]; ++ int msglen = 127; ++ ++ if (timeout_seconds) { ++ if (timeout_seconds >= 60) ++ snprintf(msg, msglen, ++ "Uptime: kernel validity duration has %d %s remaining\n", ++ (int) timeout_seconds / 60, "minute(s)"); ++ else ++ snprintf(msg, msglen, ++ "Uptime: kernel validity duration has %d %s remaining\n", ++ (int) timeout_seconds, "seconds"); ++ ++ printk(KERN_CRIT "%s", msg); ++ ++ timelimit_timer.expires = jiffies + timeout_seconds * HZ; ++ timelimit_timer.data = 0; ++ add_timer_on(&timelimit_timer, cpumask_first(cpu_online_mask)); ++ } else { ++ printk(KERN_CRIT "Uptime: Kernel validity timeout has expired\n"); ++#ifdef CONFIG_UPTIME_LIMIT_KERNEL_REBOOT ++ uptime_expiration_action = uptime_reboot; ++ wake_up_process(uptime_worker_task); ++ } ++#endif ++} ++ ++/* ++ * This thread starts and then immediately goes to sleep. When it is woken ++ * up, it carries out the instructions left in uptime_expiration_action. If ++ * no action was specified it simply goes back to sleep. ++ */ ++static int uptime_worker(void *unused) ++{ ++ set_current_state(TASK_INTERRUPTIBLE); ++ ++ while (!kthread_should_stop()) { ++ schedule(); ++ ++ if (kthread_should_stop()) ++ break; ++ ++ if (uptime_expiration_action == uptime_reboot) { ++ printk(KERN_CRIT "Uptime: restarting machine\n"); ++ kernel_restart(NULL); ++ } ++ ++ set_current_state(TASK_INTERRUPTIBLE); ++ } ++ __set_current_state(TASK_RUNNING); ++ ++ return 0; ++} ++ ++static int timeout_enable(int cpu) ++{ ++ int err = 0; ++ int warning_limit; ++ ++ /* ++ * Create an uptime worker thread. This thread is required since the ++ * safe version of kernel restart cannot be called from a ++ * non-interruptible context. Which means we cannot call it directly ++ * from a timer callback. So we arrange for the timer expiration to ++ * wakeup a thread, which performs the action. ++ */ ++ uptime_worker_task = kthread_create(uptime_worker, ++ (void *)(unsigned long)cpu, ++ "uptime_worker/%d", cpu); ++ if (IS_ERR(uptime_worker_task)) { ++ printk(KERN_ERR "Uptime: task for cpu %i failed\n", cpu); ++ err = PTR_ERR(uptime_worker_task); ++ goto out; ++ } ++ /* bind to cpu0 to avoid migration and hot plug nastiness */ ++ kthread_bind(uptime_worker_task, cpu); ++ wake_up_process(uptime_worker_task); ++ ++ /* Create the timer that will wake the uptime thread at expiration */ ++ init_timer(&timelimit_timer); ++ timelimit_timer.function = timelimit_expire; ++ /* ++ * Fire two timers. One warning timeout and the final timer ++ * which will carry out the expiration action. The warning timer will ++ * expire at the minimum of half the original time or ten minutes. ++ */ ++ warning_limit = MIN(UPTIME_LIMIT_IN_SECONDS/2, TEN_MINUTES_IN_SECONDS); ++ timelimit_timer.expires = jiffies + warning_limit * HZ; ++ timelimit_timer.data = UPTIME_LIMIT_IN_SECONDS - warning_limit; ++ ++ add_timer_on(&timelimit_timer, cpumask_first(cpu_online_mask)); ++out: ++ return err; ++} ++ ++static int __init timelimit_init(void) ++{ ++ int err = 0; ++ ++ printk(KERN_INFO "Uptime: system uptime restrictions enabled\n"); ++ ++ /* ++ * Enable the timeout thread for cpu 0 only, assuming that the ++ * uptime limit is non-zero, to protect against any cpu ++ * migration issues. ++ */ ++ if (UPTIME_LIMIT_IN_SECONDS) ++ err = timeout_enable(0); ++ ++ return err; ++} ++device_initcall(timelimit_init); +-- +2.10.1 + diff --git a/meta-tlk/recipes-kernel/linux/linux-intel_%.bbappend b/meta-tlk/recipes-kernel/linux/linux-intel_%.bbappend new file mode 100644 index 00000000..47c62efe --- /dev/null +++ b/meta-tlk/recipes-kernel/linux/linux-intel_%.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +SRC_URI_append = " file://time-limited-kernel.cfg \ + file://uptime-allow-the-optional-limiting-of-kernel-runtime.patch" diff --git a/meta-tlk/recipes-kernel/linux/linux-yocto_%.bbappend b/meta-tlk/recipes-kernel/linux/linux-yocto_%.bbappend new file mode 100644 index 00000000..30085121 --- /dev/null +++ b/meta-tlk/recipes-kernel/linux/linux-yocto_%.bbappend @@ -0,0 +1,2 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +SRC_URI_append = " file://time-limited-kernel.cfg" diff --git a/wic/core-image-tiny.wks.in b/wic/core-image-tiny.wks.in new file mode 100644 index 00000000..b0decae6 --- /dev/null +++ b/wic/core-image-tiny.wks.in @@ -0,0 +1,14 @@ +# short-description: Create an EFI disk image with systemd-boot and corei7-64/core2-32 +# long-description: Creates a partitioned EFI disk image that the user +# can directly dd to boot media. The selected bootloader is systemd-boot. +# This disk image is meant to be used by corei7-64/core2-32 and core-image-tiny-initramfs + +part /boot --source bootimg-efi --sourceparams="loader=systemd-boot,initrd=core-image-tiny-initramfs-${MACHINE}.cpio.gz" --ondisk sda --label msdos --active --align 1024 + +bootloader --ptable gpt --timeout=5 --append="init=/bin/busybox sh init console=ttyS0,115200 console=tty0 rw LABEL=boot debugshell=5" + +# Some devices require different console parameters, the console parameter can be given repeatedly, input is taken +# only from the last listed console, for example on the Minnowboard MAX, the previously listed setting would show +# a login prompt on its video output and not on the serial terminal. +# +# See http://www.tldp.org/HOWTO/Remote-Serial-Console-HOWTO/configure-kernel.html diff --git a/wic/galileodisk-sd.wks b/wic/galileodisk-sd.wks new file mode 100644 index 00000000..225778d7 --- /dev/null +++ b/wic/galileodisk-sd.wks @@ -0,0 +1,9 @@ +# short-description: Create a Galileo Gen 1/2 disk image (SD card) +# long-description: Creates a partitioned EFI disk image for Intel Galileo Gen 1/2 +# boards that the user can directly dd to an SD card and boot. + +part /boot --source bootimg-efi --sourceparams="loader=systemd-boot" --ondisk mmcblk0 --label msdos --active --align 1024 + +part / --source rootfs --ondisk mmcblk0 --fstype=ext3 --label platform --align 1024 --use-uuid + +bootloader --timeout=1 --append="rootwait console=ttyS1,115200n8 earlycon=uart8250,mmio32,0x9000b000,115200n8 reboot=efi,warm apic=debug rw LABEL=boot debugshell=5" diff --git a/wic/galileodisk-usb.wks b/wic/galileodisk-usb.wks new file mode 100644 index 00000000..b561fa09 --- /dev/null +++ b/wic/galileodisk-usb.wks @@ -0,0 +1,9 @@ +# short-description: Create a Galileo Gen 1/2 disk image (USB storage) +# long-description: Creates a partitioned EFI disk image for Intel Galileo Gen 1/2 +# that the user can directly dd to USB storage media and boot. + +part /boot --source bootimg-efi --sourceparams="loader=systemd-boot" --ondisk sda --label msdos --active --align 1024 + +part / --source rootfs --ondisk sda --fstype=ext3 --label platform --align 1024 --use-uuid + +bootloader --timeout=1 --append="rootwait console=ttyS1,115200n8 earlycon=uart8250,mmio32,0x9000b000,115200n8 reboot=efi,warm apic=debug rw LABEL=boot debugshell=5" diff --git a/wic/generic-bootdisk.wks.in b/wic/generic-bootdisk.wks.in new file mode 100644 index 00000000..31c708bc --- /dev/null +++ b/wic/generic-bootdisk.wks.in @@ -0,0 +1,6 @@ +# based off of refkit's refkit-directdisk.wks.in kickstart template +# uses the image's boot directory to populate a vfat boot partition, +# which works with EFI. +bootloader --ptable gpt +part /boot --source rootfs --rootfs-dir=${IMAGE_ROOTFS}/boot --fstype=vfat --label msdos --active --align 1024 --use-uuid +part / --source rootfs --fstype=ext4 --label root --align 1024 --uuid ${DISK_SIGNATURE_UUID} diff --git a/wic/mktinygalileodisk.wks b/wic/mktinygalileodisk.wks new file mode 100644 index 00000000..52f1e12c --- /dev/null +++ b/wic/mktinygalileodisk.wks @@ -0,0 +1,7 @@ +# short-description: Create an Galileo Gen 1/2 disk image +# long-description: Creates a partitioned EFI disk image for Intel Galileo Gen 1/2, +# that the user can directly dd to boot media. + +part /boot --source bootimg-efi --sourceparams="loader=systemd-boot,initrd=core-image-tiny-initramfs-intel-quark.cpio.gz" --ondisk mmcblk0 --label msdos --active --align 1024 + +bootloader --timeout=0 --append="console=ttyS1,115200n8 earlycon=uart8250,mmio32,0x9000b000,115200n8 reboot=efi,warm apic=debug rw LABEL=boot debugshell=5" |