diff --git a/scripts/pipelines/build.vms.sh b/scripts/pipelines/build.vms.sh deleted file mode 100755 index 4fc0e3cd4..000000000 --- a/scripts/pipelines/build.vms.sh +++ /dev/null @@ -1,238 +0,0 @@ -#!/bin/bash -set -euo pipefail - -SCRIPT_ROOT=$(realpath $(dirname $BASH_SOURCE)) -SCRIPT_RESOURCE_DIR=$(realpath "${SCRIPT_ROOT}/vm-resources") - -LOG_VERBOSEONLY_CHANNELS=(INFO) -log() { - local log_level=$1 - local log_msg=${@:2} - if [[ "${LOG_VERBOSEONLY_CHANNELS[@]}" == *"$log_level"* \ - && "${verbose:-}" != true ]]; then - return - else - echo "${log_level}:" $log_msg >&2 - fi -} - - -## CLI PARSING -usage() { - cat </dev/null - local primary_disk="${vm_fullname}.qcow2" - - # Copy OVMF UEFI files - cp -r "$SCRIPT_RESOURCE_DIR/OVMF" . - - # Provision a qcow2 disk with NILRT using the recovery media ISO. - $PYREX_RUN qemu-img create -q \ - -f qcow2 "./$vm_name-x64.qcow2" \ - "$disk_size_mb""M" - chmod 0644 "./$vm_name-x64.qcow2" - - # Enable the KVM hypervisor layer, if it seems like it is supported. - if $($PYREX_RUN test -w /dev/kvm); then - log INFO "/dev/kvm detected as writable; enabling KVM hypervisor." - enableKVM="-enable-kvm" - else - log WARN "/dev/kvm is not writable; KVM will not be enabled." - fi - - echo "Provisioning NILRT on QEMU VM..." - $PYREX_RUN qemu-system-x86_64 \ - ${enableKVM:-} -cpu Nehalem,check=false -smp cpus=1 \ - -m "$memory_mb" \ - -nographic \ - -drive if=pflash,format=raw,readonly=on,file="./OVMF/OVMF_CODE.fd" \ - -drive if=pflash,format=raw,file="./OVMF/OVMF_VARS.fd" \ - -drive file="./${vm_fullname}.qcow2",index=0,media=disk \ - -drive file="${recovery_iso}",index=1,media=cdrom,readonly=on \ - -drive file="$build_workspace/ni_provisioning.answers.iso",index=2,media=cdrom,readonly=on \ - # end qemu-system-x86_64 - - write_vm_startup_script "runQemuVM.sh" "start-vm.sh" "$primary_disk" - write_vm_startup_script "runQemuVM.bat" "start-vm.bat" "$primary_disk" - - popd >/dev/null -} - -# Create an ISO file called "ni_provisioning.answers.iso" in the current -# working directory, which contains only the answers file at $answers_file. -create_answers_iso() { - cp "$answers_file" "ni_provisioning.answers" - chmod 0444 "ni_provisioning.answers" - $PYREX_RUN genisoimage -quiet \ - -input-charset utf-8 \ - -full-iso9660-filenames \ - -o "ni_provisioning.answers.iso" \ - "ni_provisioning.answers" - chmod 0444 "ni_provisioning.answers.iso" - log DEBUG "Built answers file at $(realpath ./ni_provisioning.answers.iso) using $answers_file." -} - -error_and_die () { - log ERROR $1 - exit 1 -} - -# Copies a vm startup script template from the resource directory into the CWD, -# and replaces template values with those relevant to the VM. -write_vm_startup_script() { - local script_template=$1 - local script_destination_path=$2 - local primary_disk=$3 - - install \ - --mode=0755 \ - "${SCRIPT_RESOURCE_DIR}/${script_template}" \ - "./${script_destination_path}" - - sed -i "s%\${PRIMARY_DISK}%${primary_disk}%g" "${script_destination_path}" - sed -i "s%\${VM_MEM_SIZE_MB}%${memory_mb}%g" "${script_destination_path}" -} - - -# Source the common build setup script, so that we're pyrex-enabled and our -# working directory is changed to the build directory. -. "${SCRIPT_ROOT}/build.common.sh" - -# Realize filepaths which might be relative to the OE build workspace -DEFAULT_IMAGES_DIR=$(realpath "${DEFAULT_IMAGES_DIR}") -build_workspace=$(realpath "$build_workspace") - -# clean the vm workspace -log INFO "Using workspace: $build_workspace" -rm -Rf "$build_workspace" -[ ! -e "$build_workspace" ] -mkdir -p "$build_workspace" -pushd "$build_workspace" >/dev/null - -create_answers_iso - -# Check that the recovery ISO path is valid. -# We are doing this late in the script because the path might be relative to -# the OE build workspace, and we have just recently changed into it. -recovery_iso=$(realpath "${recovery_iso:=${DEFAULT_IMAGES_DIR}/${RECOVERY_IMAGE_RECIPE_NAME}-x64.iso}") -if [ ! -r "${recovery_iso}" ]; then - log ERROR "Recovery ISO at ${recovery_iso} does not exist or is not readable." - exit 2 -fi - -vm_fullname=${vm_name}-x64 - -build_qemu_vm "${vm_fullname}" "./${vm_fullname}-qemu" - -archive_vm_dir "${vm_fullname}-qemu" - -popd >/dev/null -exit 0 diff --git a/scripts/pipelines/qemu/.gitignore b/scripts/pipelines/qemu/.gitignore new file mode 100644 index 000000000..970a6e6c7 --- /dev/null +++ b/scripts/pipelines/qemu/.gitignore @@ -0,0 +1,8 @@ +# Makefile objects +nilrt-x64-qemu/ +nilrt-x64-qemu.zip +**/*.iso +**/*.qcow2 +**/*.img +**/*.fd +**/*.zip diff --git a/scripts/pipelines/qemu/Makefile b/scripts/pipelines/qemu/Makefile new file mode 100644 index 000000000..8bb3b1781 --- /dev/null +++ b/scripts/pipelines/qemu/Makefile @@ -0,0 +1,141 @@ + +.DEFAULT_GOAL := all +.DELETE_ON_ERROR: + +# CUSTOMIZABLE PARAMETERS +DISK_SIZE_MB ?= 4096 +MEMORY_MB ?= 1024 +VM_NAME ?= nilrt-x64-qemu +PRIMARY_DISK = $(VM_NAME).qcow2 +KVMOPTS = $(shell test -w /dev/kvm && echo "-enable-kvm" || echo "") + +# DIRECTORIES +bbdir ?= ../../../build +bbdeploy = $(bbdir)/tmp-glibc/deploy/images/x64 +builddir = $(VM_NAME) + +# BINARIES +BITBAKE ?= $(PYREX_RUN) bitbake +GENISOIMAGE ?= $(PYREX_RUN) genisoimage +PYREX_RUN ?= pyrex-run +QEMU_SYSTEM_X86_64 ?= $(PYREX_RUN) qemu-system-x86_64 +ZIP ?= zip + + +# ============================================================================== +# REAL TARGETS +# ============================================================================== + +$(builddir)/ni_provisioning.answers : ni_provisioning.answers + mkdir -p $(@D) + cp $< $@ + chmod 0444 "$@" + + +ni_provisioning.answers.iso : $(builddir)/ni_provisioning.answers + $(GENISOIMAGE) -quiet \ + -input-charset utf-8 \ + -full-iso9660-filenames \ + -o "$@" \ + "$<" + chmod 0444 "$@" + + +$(bbdeploy)/ovmf.% &: + $(BITBAKE) ovmf + + +$(builddir)/OVMF/%.fd : $(bbdeploy)/%.fd + mkdir -p $(@D) + cp $< $@ + + +$(builddir)/start-vm.% : start-vm.%.in + mkdir -p $(@D) + install -c $< $@ + sed -i "s%\$${PRIMARY_DISK}%$(PRIMARY_DISK)%g" "$@" + sed -i "s%\$${VM_MEM_SIZE_MB}%$(MEMORY_MB)%g" "$@" + + +primary_disk_path = $(builddir)/$(PRIMARY_DISK) +vmdeps = \ + $(builddir)/ni_provisioning.answers \ + $(builddir)/OVMF/ovmf.code.fd \ + $(builddir)/OVMF/ovmf.vars.fd \ + $(builddir)/start-vm.bat \ + $(builddir)/start-vm.sh \ + $(recovery_iso) \ + ni_provisioning.answers.iso +$(primary_disk_path) : $(vmdeps) + rm -f "$@" + qemu-img create -f qcow2 "$@" "$(DISK_SIZE_MB)""M" + chmod 0644 "$@" + $(QEMU_SYSTEM_X86_64) \ + $(KVMOPTS) \ + -cpu Nehalem,check=false \ + -smp cpus=1 \ + -m $(MEMORY_MB) \ + -nographic \ + -drive if=pflash,format=raw,readonly=on,file="$(builddir)/OVMF/ovmf.code.fd" \ + -drive if=pflash,format=raw,file="$(builddir)/OVMF/ovmf.vars.fd" \ + -drive file="$(primary_disk_path)",media=disk,index=0 \ + -drive file="$(recovery_iso)",media=cdrom,readonly=on,index=1 \ + -drive file="ni_provisioning.answers.iso",media=cdrom,readonly=on,index=2 + + +recovery_iso = $(bbdeploy)/nilrt-recovery-media-x64.iso +$(recovery_iso) : + $(BITBAKE) nilrt-recovery-media + + +$(VM_NAME).zip : $(primary_disk_path) $(vmdeps) $(recovery_iso) + rm -f "$@" + $(ZIP) --quiet --recurse-paths "$@" "$(builddir)" + chmod 0444 "$@" + + + +# ============================================================================== +# PHONY TARGETS +# ============================================================================== + +all : $(VM_NAME).zip +.PHONY : all + + +clean : + rm -rf $(builddir) + rm -f $(VM_NAME).zip + rm -f ni_provisioning.answers.iso +.PHONY : clean + + +help : + @echo "NILRT VM Resources Makefile" + @echo "============================" + @echo "" + @echo "PURPOSE:" + @echo " This Makefile builds a QEMU VM package for testing NILRT images." + @echo " It creates a bootable VM with OVMF UEFI firmware, a primary disk," + @echo " and the NILRT recovery media pre-configured." + @echo "" + @echo "PREREQUISITES:" + @echo " You must source the ni-oe-init-build-env script from the project root" + @echo " before running this Makefile:" + @echo " $$ source ../../../ni-oe-init-build-env" + @echo "" + @echo "CUSTOMIZABLE PARAMETERS:" + @echo " DISK_SIZE_MB Size of the VM disk in megabytes (default: 4096)" + @echo " MEMORY_MB VM memory size in megabytes (default: 1024)" + @echo " VM_NAME Name of the VM directory and zip file (default: nilrt-x64-qemu)" + @echo " PRIMARY_DISK Name of the primary disk image (default: nilrt-x64-qemu.qcow2)" + @echo "" + @echo "USAGE:" + @echo " make Build the VM package (creates $(VM_NAME).zip)" + @echo " make clean Remove all generated files" + @echo " make help Display this help message" + @echo "" + @echo "EXAMPLE:" + @echo " $$ make DISK_SIZE_MB=8192 MEMORY_MB=2048" + @echo "" +.PHONY : help diff --git a/scripts/pipelines/vm-resources/ni_provisioning.answers b/scripts/pipelines/qemu/ni_provisioning.answers similarity index 100% rename from scripts/pipelines/vm-resources/ni_provisioning.answers rename to scripts/pipelines/qemu/ni_provisioning.answers diff --git a/scripts/pipelines/vm-resources/runQemuVM.bat b/scripts/pipelines/qemu/start-vm.bat.in similarity index 100% rename from scripts/pipelines/vm-resources/runQemuVM.bat rename to scripts/pipelines/qemu/start-vm.bat.in diff --git a/scripts/pipelines/vm-resources/runQemuVM.sh b/scripts/pipelines/qemu/start-vm.sh.in similarity index 62% rename from scripts/pipelines/vm-resources/runQemuVM.sh rename to scripts/pipelines/qemu/start-vm.sh.in index 493c79c42..afd3ff19f 100755 --- a/scripts/pipelines/vm-resources/runQemuVM.sh +++ b/scripts/pipelines/qemu/start-vm.sh.in @@ -21,6 +21,7 @@ Opts: -h : Display this help and exit. -g : Start VM with arguments appropriate for graphical usage -s : Start VM in snapshot mode (changes not saved to disk) + -t : Give the VM an emulated TPM2 device. Requires swtpm to be installed. Args: -a mac_address : Use this static MAC address for the primary NIC, instead of @@ -34,7 +35,7 @@ EOF } -while getopts ":a:b:c:f:ghm:s-" opt; do +while getopts ":a:b:c:f:ghm:s-t" opt; do case ${opt} in a) macaddr=$OPTARG @@ -61,6 +62,9 @@ while getopts ":a:b:c:f:ghm:s-" opt; do s) snapshot=true ;; + t) + tpm=true + ;; -) break ;; @@ -101,11 +105,21 @@ else nilrt_net0_args="user,id=nilrt_net0" fi + +# ============================================================================== +# Setup SSH +# ============================================================================== + # optionally forward a host port to the guest SSH port if [ -n "${forward_port}" ]; then nilrt_net0_args="${nilrt_net0_args},hostfwd=tcp::${forward_port}-:22" fi + +# ============================================================================== +# Setup KVM +# ============================================================================== + # Enable the KVM hypervisor layer, if it seems like it is supported. if [ -w /dev/kvm ]; then echo "INFO: /dev/kvm detected as writable. Enabling KVM hypervisor." @@ -114,14 +128,62 @@ else echo "INFO: /dev/kvm is not writable. KVM will not be enabled." fi -SCRIPT_DIR="`dirname "$BASH_SOURCE[0]"`" + +SCRIPT_DIR="$(realpath $(dirname ${BASH_SOURCE[0]}))" + +# ============================================================================== +# Setup TPM +# ============================================================================== + + +if [ "$tpm" = true ] ; then + echo "INFO: Setting up emulated TPM2 device for VM." + mkdir -p "${SCRIPT_DIR}/tpm" + + # Initialize TPM state if it doesn't exist + if [ ! -f "${SCRIPT_DIR}/tpm/tpm2-00.permall" ]; then + echo "INFO: Initializing TPM state..." + if ! swtpm_setup \ + --tpm2 \ + --tpmstate "${SCRIPT_DIR}/tpm" \ + --not-overwrite \ + --vmid test-vm \ + --pcr-banks sha256; then + echo "ERROR: swtpm_setup failed. Cannot initialize TPM emulator." >&2 + exit 1 + fi + fi + + swtpm socket \ + --tpm2 \ + --tpmstate dir="${SCRIPT_DIR}/tpm" \ + --ctrl type=unixio,path="${SCRIPT_DIR}/tpm/swtpm-sock",mode=0600 \ + --log level=20 \ + --terminate \ + --daemon + + tpmargs="\ + -chardev socket,id=chrtpm,path=${SCRIPT_DIR}/tpm/swtpm-sock \ + -tpmdev emulator,id=tpm0,chardev=chrtpm \ + -device tpm-tis,tpmdev=tpm0 \ + " +else + tpmargs="" +fi + + +# ============================================================================== +# Start QEMU +# ============================================================================== + set -x qemu-system-x86_64 \ ${enableKVM:-} -cpu Nehalem,check=false -smp cpus=${cpu_count:-1} -machine vmport=off \ -m "${mem_mbs:-${VM_MEM_SIZE_MB}}" \ - -drive if=pflash,format=raw,readonly,file="$SCRIPT_DIR/OVMF/OVMF_CODE.fd" \ - -drive if=pflash,format=raw,file="$SCRIPT_DIR/OVMF/OVMF_VARS.fd" \ + -drive if=pflash,format=raw,readonly=on,file="$SCRIPT_DIR/OVMF/ovmf.code.fd" \ + -drive if=pflash,format=raw,file="$SCRIPT_DIR/OVMF/ovmf.vars.fd" \ -drive file="$SCRIPT_DIR/${PRIMARY_DISK}",index=0,media=disk \ -device e1000,netdev=nilrt_net0,mac=$macaddr \ -netdev ${nilrt_net0_args} \ + ${tpmargs:-} \ ${qemu_args:-} diff --git a/scripts/pipelines/vm-resources/OVMF/OVMF_CODE.fd b/scripts/pipelines/vm-resources/OVMF/OVMF_CODE.fd deleted file mode 100644 index 32aefee63..000000000 Binary files a/scripts/pipelines/vm-resources/OVMF/OVMF_CODE.fd and /dev/null differ diff --git a/scripts/pipelines/vm-resources/OVMF/OVMF_VARS.fd b/scripts/pipelines/vm-resources/OVMF/OVMF_VARS.fd deleted file mode 100644 index 3b8bb9b61..000000000 Binary files a/scripts/pipelines/vm-resources/OVMF/OVMF_VARS.fd and /dev/null differ diff --git a/scripts/pipelines/vm-resources/OVMF/copyright b/scripts/pipelines/vm-resources/OVMF/copyright deleted file mode 100644 index 7baee9ed7..000000000 --- a/scripts/pipelines/vm-resources/OVMF/copyright +++ /dev/null @@ -1,403 +0,0 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: edk2 -Source: git://github.com/tianocore/edk2.git, http://www.openssl.org/source/, - and https://efi-shell.svn.sourceforge.net/svnroot/efi-shell/trunk/Shell, - with .efi binary files removed from the source at package generation time. - See get-orig-source in debian/rules for details. - -Files: * -Copyright: 1999-2013, Intel Corporation -License: BSD-2-clause - -Files: StdLib/PosixLib/Stringlist/stringlist.c StdLib/PosixLib/Gen/dirname.c - StdLib/LibC/Time/strptime.c StdLib/LibC/Locale/aliasname_local.h - StdLib/LibC/Locale/wcsxfrm.c StdLib/LibC/Locale/wcstold.c - StdLib/LibC/Locale/__mb_cur_max.c StdLib/LibC/Locale/_wcstod.h - StdLib/LibC/Locale/aliasname.c StdLib/LibC/Locale/__wctoint.h - StdLib/LibC/Locale/wcsftime.c StdLib/LibC/Locale/wcscoll.c - StdLib/LibC/Locale/wcstof.c StdLib/LibC/Locale/wcstod.c - StdLib/LibC/Locale/wcstoul.c StdLib/LibC/Locale/setlocale32.c - StdLib/LibC/Math/* StdLib/LibC/gdtoa/* StdLib/LibC/StdLib/setprogname.c - StdLib/Include/strings.h StdLib/Include/Ipf/* StdLib/Include/nsswitch.h - StdLib/Include/stringlist.h StdLib/BsdSocketLib/getnetnamadr.c - StdLib/BsdSocketLib/getnetbynis.c StdLib/BsdSocketLib/gethostnamadr.c - StdLib/BsdSocketLib/gethostbynis.c -Copyright: 1993, Sun Microsystems, Inc. - 1994, Garrett Wollman - 1994-2008, The NetBSD Foundation, Inc. - 1994-1996, Carnegie-Mellon University - 1996-1997 John D. Polstra - 1998-2000, Lucent Technologies - 1998-2001, Doug Rabson - 1999-2006, Citrus Project - 1999-2012, Intel Corporation - 2002, YAMAMOTO Takashi - 2002, Tim J. Robbins - 2002-2004, Marcel Moolenaar - 2003, David Schultz -License: BSD-2-clause - -Files: OvmfPkg/* -Copyright: 2004-2013, Intel Corporation - 2008-2009, Apple Inc. - 2011, Andrei Warkentin - 2011-2012, Bei Guan - 2012-2013, Red Hat, Inc -License: BSD-2-clause - -Files: BaseTools/Source/C/GenFw/elf*.h - BaseTools/Source/Python/sitecustomize.py DuetPkg/build*.sh - EmulatorPkg/* MdeModulePkg/Core/DxeIplPeim/Arm/DxeLoadFunc.c - MdeModulePkg/Library/PeiDebugPrintHobLib/PeiDebugPrintHobLib.c - MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c - MdePkg/Include/* MdePkg/Library/* -Copyright: 1996-1998 John D. Polstra - 2004-2013, Intel Corporation - 2006, Tristan Gingold - 2008-2012, Apple Inc. - 2011-2013, ARM Limited - 2013, Red Hat, Inc. -License: BSD-2-clause - -Files: ArmPkg/* ArmPlatformPkg/* BaseTools/Source/C/Common/*PeCoff*.c - BaseTools/Source/C/GenFv/GenFvInternalLib.c - BaseTools/Source/C/GenFw/Elf64Convert.c - BaseTools/Source/C/Include/AArch64/* - BaseTools/Source/C/Include/Arm/* - BaseTools/Source/C/Include/IndustryStandard/PeImage.h - BeagleBoardPkg/* EmbeddedPkg/* Omap35xxPkg/* -Copyright: 2011-2013, ARM Limited - 2008-2010, Apple Inc. - 2004-2013, Intel Corporation - 2009, Hewlett-Packard Company - 2011, Hewlett-Packard Corporation - 2003-2008 University of Illinois at Urbana-Champaign -License: BSD-2-clause - -Files: ShellPkg/Application/Shell/* ShellPkg/Library/* -Copyright: 1999-2013, Intel Corporation - 2013, Hewlett-Packard Development Company, L.P. -License: BSD-2-clause - -Files: ArmPkg/Library/CompilerIntrinsicsLib/AArch64/memcpy.S - ArmPlatformPkg/ArmVExpressPkg/Scripts/uefi-aarch64-bootstrap/* - EdkCompatibilityPkg/* Shell/* - StdLibPrivateInternalFiles/Include/kfile.h StdLib/PosixLib/Glob/glob.c - StdLib/PosixLib/Gen/readdir.c StdLib/PosixLib/Gen/utime.c - StdLib/PosixLib/Gen/opendir.c StdLib/PosixLib/Gen/closedir.c - StdLib/LibC/Time/gettimeofday.c StdLib/LibC/Locale/_wcstol.h - StdLib/LibC/Locale/rune.h StdLib/LibC/Locale/setlocale.c - StdLib/LibC/Locale/iswctype_sb.c StdLib/LibC/Locale/_wcstoul.h - StdLib/LibC/Locale/multibyte_sb.c StdLib/LibC/Locale/runetype.h - StdLib/LibC/String/strncasecmp.c StdLib/LibC/Main/is*.c - StdLib/LibC/Main/*/is*.c StdLib/LibC/NetUtil/inet_*.c - StdLib/LibC/Stdio/* StdLib/LibC/StdLib/* StdLib/Include/netatalk/* - StdLib/Include/glob.h StdLib/Include/Ipf/machine/limits.h - StdLib/Include/Ipf/machine/int_types.h - StdLib/Include/Ipf/machine/param.h StdLib/Include/Ipf/machine/stdarg.h - StdLib/Include/Ipf/machine/types.h StdLib/Include/Ipf/machine/varargs.h - StdLib/Include/Ipf/machine/vmparam.h StdLib/Include/Ipf/machine/ansi.h - StdLib/Include/Ipf/machine/aout_machdep.h StdLib/Include/netinet6/in6.h - StdLib/Include/pwd.h StdLib/Include/locale.h StdLib/Include/dirent.h - StdLib/Include/arpa/nameser.h StdLib/Include/arpa/inet.h - StdLib/Include/utime.h StdLib/Include/netinet/in.h - StdLib/Include/netinet/tcp.h StdLib/Include/X64/machine/atomic.h - StdLib/Include/X64/machine/asm.h StdLib/Include/X64/machine/int_types.h - StdLib/Include/X64/machine/types.h StdLib/Include/X64/machine/ansi.h - StdLib/Include/paths.h StdLib/Include/netdb.h - StdLib/Include/Ia32/machine/asm.h StdLib/Include/Ia32/machine/int_types.h - StdLib/Include/Ia32/machine/param.h StdLib/Include/Ia32/machine/types.h - StdLib/Include/Ia32/machine/ansi.h StdLib/BsdSocketLib/getaddrinfo.c - StdLib/BsdSocketLib/getnameinfo.c -Copyright: 1982-2013, Intel Corporation - 1982-1994, The Regents of the University of California - 1990-1991, Regents of The University of Michigan - 1993-1994, Digital Equipment Corporation - 1995, Jason Downs - 1995-1997, Kungliga Tekniska Hogskolan - 1995-1998, WIDE Project - 1996-1999, Internet Software Consortium - 1997, Todd C. Miller - 2002, Wasabi Systems, Inc - 2004, Internet Systems Consortium, Inc. - 2010-2012, Intel Corporation - 2011-2013, ARM Limited -License: BSD-3-clause - -Files: StdLibPrivateInternalFiles/Include/namespace.h - StdLibPrivateInternalFiles/Include/reentrant.h - StdLibPrivateInternalFiles/Include/extern.h - StdLib/PosixLib/Err/warn_err.c StdLib/LibC/Time/timegm.c - StdLib/LibC/Time/strftime.c StdLib/LibC/Locale/ctypeio.* - StdLib/LibC/String/strsep.c StdLib/LibC/gdtoa/_strtold.c - StdLib/LibC/gdtoa/_strtof.c StdLib/LibC/Main/Arm/flt_rounds.c - StdLib/LibC/Uefi/writev.c StdLib/LibC/Uefi/select.c - StdLib/LibC/Uefi/compat.c StdLib/LibC/NetUtil/inet_addr.c - StdLib/LibC/Stdio/fparseln.c StdLib/LibC/Stdio/vswscanf.c - StdLib/LibC/Stdio/vfwscanf.c StdLib/LibC/Stdio/flockfile.c - StdLib/Include/sys/* StdLib/Include/x86/ieee.h - StdLib/Include/sysexits StdLib/Include/Ipf/machine/loadfile_machdep.h - StdLib/Include/Ipf/machine/cpu_counter.h - StdLib/Include/Ipf/machine/pmap.h - StdLib/Include/Ipf/machine/wchar_limits.h - StdLib/Include/Ipf/machine/cpu.h StdLib/Include/Ipf/machine/disklabel.h - StdLib/Include/Ipf/machine/ptrace.h StdLib/Include/Ipf/machine/setjmp.h - StdLib/Include/Ipf/machine/int_limits.h StdLib/Include/nl_types.h - StdLib/Include/Arm/machine/* StdLib/Include/net/* - StdLib/Include/inttypes.h StdLib/Include/arpa/telnet.h - StdLib/Include/arpa/nameser_compat.h StdLib/Include/arpa/ftp.h - StdLib/Include/netinet/ip.h StdLib/Include/netinet/in_systm.h - StdLib/Include/*/machine/int_mwgwtypes.h - StdLib/Include/*/machine/int_const.h - StdLib/Include/X64/machine/byte_swap.h - StdLib/Include/*/machine/int_fmtio.h - StdLib/Include/X64/machine/int_limits.h StdLib/Include/resolv.h - StdLib/Include/netns/ns.h StdLib/Include/Ia32/machine/byte_swap.h - StdLib/Include/Ia32/machine/int_limits.h StdLib/BsdSocketLib/map_v4v6.c - StdLib/BsdSocketLib/inet_net_pton.c StdLib/BsdSocketLib/res_*.c - StdLib/BsdSocketLib/sethostname.c StdLib/BsdSocketLib/ns_*.c - StdLib/BsdSocketLib/getnetbyht.c StdLib/BsdSocketLib/getproto.c - StdLib/BsdSocketLib/gethostname.c StdLib/BsdSocketLib/gethostbydns.c - StdLib/BsdSocketLib/herror.c StdLib/BsdSocketLib/getprotoname.c - StdLib/BsdSocketLib/inet_neta.c StdLib/BsdSocketLib/getservbyport.c - StdLib/BsdSocketLib/inet_pton.c StdLib/BsdSocketLib/getservent.c - StdLib/BsdSocketLib/gethostbyht.c StdLib/BsdSocketLib/getservbyname.c - StdLib/BsdSocketLib/getnetbydns.c StdLib/BsdSocketLib/getprotoent.c -Copyright: 1983-1993, Digital Equipment Corporation - 1982-1994, Regents of the University of California - 1988, University of Utah - 1993, Carlos Leandro and Rui Salgueiro - 1994, Christopher G. Demetriou - 1994, Winning Strategies, Inc - 1994-1997, Mark Brinicombe - 1996, Internet Software Consortium - 1996-1997, Christos Zoulas - 1997-2006, The NetBSD Foundation, Inc - 1998 HD Associates, Inc - 2000-2001, Artur Grabowski - 1999-2012, Intel Corporation -License: BSD-4-clause - -Files: StdLib/LibC/Stdio/fileext.h StdLib/LibC/Stdio/wscanf.c - StdLib/LibC/Stdio/vwscanf.c StdLib/LibC/Stdio/*wc.c - StdLib/LibC/Stdio/*wchar.c StdLib/LibC/Stdio/fgetws.c - StdLib/LibC/Stdio/swscanf.c StdLib/LibC/Stdio/wcio.h - StdLib/LibC/Stdio/fwide.c StdLib/LibC/Stdio/fwscanf.c - StdLib/LibC/Stdio/wprintf.c StdLib/LibC/Stdio/swprintf.c - StdLib/LibC/Stdio/fputws.c StdLib/LibC/Stdio/vwprintf.c - StdLib/LibC/Stdio/fwprintf.c -Copyright: 2001, Citrus Project - 2002, Tim J. Robbins - 2010-2012, Intel Corporation -License: BSD-2-clause - -Files: StdLib/LibC/String/strlcat.c StdLib/LibC/String/strlcpy.c - StdLib/LibC/NetUtil/inet_ntop.c StdLib/BsdSocketLib/base64.c - StdLib/BsdSocketLib/inet_net_ntop.c StdLib/BsdSocketLib/res_data.c - StdLib/BsdSocketLib/ns_netint.c StdLib/BsdSocketLib/nsap_addr.c -Copyright: 1998, Todd C. Miller - 1996-1999, Internet Software Consortium - 1995-2000, International Business Machines, Inc - 2004, Internet Systems Consortium, Inc. - 2011, Intel Corporation -License: ISC - -Files: CryptoPkg/Library/OpensslLib/openssl-0.9.8w/* -Copyright: 1998-2004 The OpenSSL Project - 1995-1998 Eric A. Young, Tim J. Hudson -License: OpenSSL - -License: BSD-2-clause - 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. - . - 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 THE - COPYRIGHT HOLDER OR 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. - -License: BSD-3-clause - 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 the 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 THE COPYRIGHT - OWNER OR 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, - 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. - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - -License: BSD-4-clause - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. 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. - 3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed by the NetBSD - Foundation, Inc. and its contributors. - 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. 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 THE FOUNDATION OR 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. - -License: OpenSSL - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - . - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - . - 2. 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. - . - 3. All advertising materials mentioning features or use of this - software must display the following acknowledgment: - "This product includes software developed by the OpenSSL Project - for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - . - 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - endorse or promote products derived from this software without - prior written permission. For written permission, please contact - openssl-core@openssl.org. - . - 5. Products derived from this software may not be called "OpenSSL" - nor may "OpenSSL" appear in their names without prior written - permission of the OpenSSL Project. - . - 6. Redistributions of any form whatsoever must retain the following - acknowledgment: - "This product includes software developed by the OpenSSL Project - for use in the OpenSSL Toolkit (http://www.openssl.org/)" - . - THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - EXPRESSED 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 THE OpenSSL PROJECT OR - ITS 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. - ==================================================================== - . - This product includes cryptographic software written by Eric Young - (eay@cryptsoft.com). This product includes software written by Tim - Hudson (tjh@cryptsoft.com). - . - This library is free for commercial and non-commercial use as long as - the following conditions are aheared to. The following conditions - apply to all code found in this distribution, be it the RC4, RSA, - lhash, DES, etc., code; not just the SSL code. The SSL documentation - included with this distribution is covered by the same copyright terms - except that the holder is Tim Hudson (tjh@cryptsoft.com). - . - Copyright remains Eric Young's, and as such any Copyright notices in - the code are not to be removed. - If this package is used in a product, Eric Young should be given attribution - as the author of the parts of the library used. - This can be in the form of a textual message at program startup or - in documentation (online or textual) provided with the package. - . - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the copyright - notice, this list of conditions and the following disclaimer. - 2. 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. - 3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - "This product includes cryptographic software written by - Eric Young (eay@cryptsoft.com)" - The word 'cryptographic' can be left out if the rouines from the library - being used are not cryptographic related :-). - 4. If you include any Windows specific code (or a derivative thereof) from - the apps directory (application code) you must include an acknowledgement: - "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - . - THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``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 THE AUTHOR OR 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. - . - The licence and distribution terms for any publically available version or - derivative of this code cannot be changed. i.e. this code cannot simply be - copied and put under another distribution licence - [including the GNU Public Licence.] - -License: ISC - Permission to use, copy, modify, and distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - . - THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS - ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES - OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE - CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - SOFTWARE.