Skip to content

Commit

Permalink
Merge pull request intel#78 from intel-innersource/merge-main-6.1.0
Browse files Browse the repository at this point in the history
Merge main 6.1.0
  • Loading branch information
novafacing authored Apr 25, 2024
2 parents cd99801 + 4b6ae1e commit 7b36aca
Show file tree
Hide file tree
Showing 537 changed files with 49,414 additions and 16,237 deletions.
20 changes: 5 additions & 15 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
config.mk
.package-list
.modcache
Dockerfile
.project-properties/
bin/
linux64/
win64/
packageinfo/
target/
documentation
simics
simics-eclipse
simics-gui
compiler.mk
# Ignore dockerfile so re-runs with dockerfile-only fixes don't rebuild
**/Dockerfile
**/target/
**/*.img
**/*.diff.craff
6 changes: 5 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
*.ispm filter=lfs diff=lfs merge=lfs -text
*.tar.gz filter=lfs diff=lfs merge=lfs -text
*.ext2 filter=lfs diff=lfs merge=lfs -text
*.ext2 filter=lfs diff=lfs merge=lfs -text
*.fs filter=lfs diff=lfs merge=lfs -text
*.craff filter=lfs diff=lfs merge=lfs -text
Image filter=lfs diff=lfs merge=lfs -text
*.elf filter=lfs diff=lfs merge=lfs -text
1 change: 0 additions & 1 deletion .github/builder/.dockerignore

This file was deleted.

57 changes: 51 additions & 6 deletions .github/builder/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,47 @@
# hadolint global ignore=DL3033,SC3044
FROM novafacing/fedora-rustc-oldcompat:0.0.2
FROM fedora:20

ENV PATH="${PATH}:/root/.cargo/bin/"

COPY .github/builder/rsrc/rustup-init /install/rustup-init
COPY .github/builder/rsrc/make-4.4.1.tar.gz /install/make-4.4.1.tar.gz
COPY .github/builder/rsrc/cmake-3.28.0-rc5-linux-x86_64.tar.gz /install/cmake-3.28.0-rc5-linux-x86_64.tar.gz
COPY .github/builder/rsrc/lld-5.0.2.src.tar.xz /install/lld-5.0.2.src.tar.xz
COPY .github/builder/rsrc/cfe-5.0.2.src.tar.xz /install/cfe-5.0.2.src.tar.xz
COPY .github/builder/rsrc/llvm-5.0.2.src.tar.xz /install/llvm-5.0.2.src.tar.xz
COPY .github/builder/rsrc/rpms /install/rpms

RUN yum -y install /install/rpms/*.rpm && yum clean all

RUN chmod +x /install/rustup-init && \
/install/rustup-init -y --default-toolchain nightly && \
mkdir -p /make && \
tar -C /make --strip-components=1 -xf /install/make-4.4.1.tar.gz && \
pushd /make && \
./configure && \
make && \
make install && \
make clean && \
popd && \
tar -C /usr/local/ --strip-components=1 -xf /install/cmake-3.28.0-rc5-linux-x86_64.tar.gz && \
mkdir -p /llvm/tools/clang && \
mkdir -p /llvm/tools/lld && \
tar -C /llvm --strip-components=1 -xf /install/llvm-5.0.2.src.tar.xz && \
tar -C /llvm/tools/clang --strip-components=1 -xf /install/cfe-5.0.2.src.tar.xz && \
tar -C /llvm/tools/lld --strip-components=1 -xf /install/lld-5.0.2.src.tar.xz && \
mkdir -p /llvm/build && \
pushd /llvm/build && \
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="MinSizeRel" -DLLVM_TARGETS_TO_BUILD="X86" .. && \
make -j "$(nproc)" && \
make install && \
make clean && \
rm -rf /llvm/build/ && \
popd && \
rm -rf /make /llvm

WORKDIR /

ARG PUBLIC_SIMICS_PACKAGE_VERSION_1000
ENV PATH="${PATH}:/simics/ispm/"
ENV PATH="${PATH}:/root/.cargo/bin/"

Expand All @@ -9,9 +50,13 @@ COPY . /tsffs/
WORKDIR /tsffs/

RUN mkdir -p /simics/ispm && \
tar -C /simics/ispm --strip-components=1 -xvf .github/builder/rsrc/ispm.tar.gz && \
tar -C /simics/ispm --strip-components=1 -xf .github/builder/rsrc/ispm.tar.gz && \
ispm settings install-dir /simics && \
ispm packages --install-bundle .github/builder/rsrc/simics.ispm --non-interactive --trust-insecure-packages && \
ispm projects "$(pwd)" --create --ignore-existing-files --non-interactive && \
bin/project-setup --force && \
cargo -Zscript build.rs
ispm packages --install-bundle .github/builder/rsrc/simics.ispm --non-interactive --trust-insecure-packages

RUN RUSTFLAGS="-C linker=clang -C link-arg=-fuse-ld=$(which ld.lld)" && \
export RUSTFLAGS && \
cargo install --path simics-rs/cargo-simics-build && \
cargo simics-build -r && \
mkdir -p /packages && \
cp target/release/*.ispm /packages
77 changes: 68 additions & 9 deletions .github/builder/build.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,82 @@
#!/bin/bash

PUBLIC_SIMICS_PKGS_URL="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/881ee76a-c24d-41c0-af13-5d89b2a857ff/simics-6-packages-2023-31-linux64.ispm"
PUBLIC_SIMICS_ISPM_URL="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/881ee76a-c24d-41c0-af13-5d89b2a857ff/intel-simics-package-manager-1.7.5-linux64.tar.gz"
# NOTE: Do not just copy-paste scripts/build.sh!

LLD_URL="https://releases.llvm.org/5.0.2/lld-5.0.2.src.tar.xz"
CFE_URL="https://releases.llvm.org/5.0.2/cfe-5.0.2.src.tar.xz"
LLVM_SRC_URL="https://releases.llvm.org/5.0.2/llvm-5.0.2.src.tar.xz"
MAKE_SRC_URL="https://ftp.gnu.org/gnu/make/make-4.4.1.tar.gz"
RUSTUP_INIT_URL="https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init"
CMAKE_URL="https://github.com/Kitware/CMake/releases/download/v3.28.0-rc5/cmake-3.28.0-rc5-linux-x86_64.tar.gz"
PUBLIC_SIMICS_PKGS_URL="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/ead79ef5-28b5-48c7-8d1f-3cde7760798f/simics-6-packages-2024-05-linux64.ispm"
PUBLIC_SIMICS_ISPM_URL="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/ead79ef5-28b5-48c7-8d1f-3cde7760798f/intel-simics-package-manager-1.8.3-linux64.tar.gz"
PUBLIC_SIMICS_PACKAGE_VERSION_1000="6.0.185"
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
ROOT_DIR="${SCRIPT_DIR}/../../"
BUILDER_DIR="${ROOT_DIR}/.github/builder/"
IMAGE_NAME="tsffs-builder"
CONTAINER_UID=$(echo "${RANDOM}" | sha256sum | head -c 8)
CONTAINER_NAME="${IMAGE_NAME}-tmp-${CONTAINER_UID}"

mkdir -p "${SCRIPT_DIR}/rsrc"
if [ ! -f "${SCRIPT_DIR}/rsrc/ispm.tar.gz" ]; then
curl --noproxy '*.intel.com' -o "${SCRIPT_DIR}/rsrc/ispm.tar.gz" \
mkdir -p "${BUILDER_DIR}/rsrc"

if [ ! -f "${BUILDER_DIR}/rsrc/ispm.tar.gz" ]; then

curl --noproxy '*.intel.com' -L -o "${BUILDER_DIR}/rsrc/ispm.tar.gz" \
"${PUBLIC_SIMICS_ISPM_URL}"
fi
if [ ! -f "${SCRIPT_DIR}/rsrc/simics.ispm" ]; then
curl --noproxy '*.intel.com' -o "${SCRIPT_DIR}/rsrc/simics.ispm" \

if [ ! -f "${BUILDER_DIR}/rsrc/simics.ispm" ]; then
curl --noproxy '*.intel.com' -L -o "${BUILDER_DIR}/rsrc/simics.ispm" \
"${PUBLIC_SIMICS_PKGS_URL}"
fi

docker build -t "${IMAGE_NAME}" -f "${SCRIPT_DIR}/Dockerfile" "${SCRIPT_DIR}/../../"
if [ ! -f "${BUILDER_DIR}/rsrc/lld-5.0.2.src.tar.xz" ]; then
curl --noproxy '*.intel.com' -L -o "${BUILDER_DIR}/rsrc/lld-5.0.2.src.tar.xz" \
"${LLD_URL}"
fi

if [ ! -f "${BUILDER_DIR}/rsrc/cfe-5.0.2.src.tar.xz" ]; then
curl --noproxy '*.intel.com' -L -o "${BUILDER_DIR}/rsrc/cfe-5.0.2.src.tar.xz" \
"${CFE_URL}"
fi

if [ ! -f "${BUILDER_DIR}/rsrc/llvm-5.0.2.src.tar.xz" ]; then
curl --noproxy '*.intel.com' -L -o "${BUILDER_DIR}/rsrc/llvm-5.0.2.src.tar.xz" \
"${LLVM_SRC_URL}"
fi

if [ ! -f "${BUILDER_DIR}/rsrc/make-4.4.1.tar.gz" ]; then
curl --noproxy '*.intel.com' -L -o "${BUILDER_DIR}/rsrc/make-4.4.1.tar.gz" \
"${MAKE_SRC_URL}"
fi

if [ ! -f "${BUILDER_DIR}/rsrc/rustup-init" ]; then
curl --noproxy '*.intel.com' -L -o "${BUILDER_DIR}/rsrc/rustup-init" \
"${RUSTUP_INIT_URL}"
chmod +x "${BUILDER_DIR}/rsrc/rustup-init"
fi

if [ ! -f "${BUILDER_DIR}/rsrc/cmake-3.28.0-rc5-linux-x86_64.tar.gz" ]; then
curl --noproxy '*.intel.com' -L -o "${BUILDER_DIR}/rsrc/cmake-3.28.0-rc5-linux-x86_64.tar.gz" \
"${CMAKE_URL}"
fi

if [ ! -d "${BUILDER_DIR}/rsrc/rpms" ]; then
echo "RPM dependencies not found. Downloading..."
# NOTE: This may stop working at some point, as Fedora 20 is EOL. Therefore, we download the
# packages with the expectation that we will provide them separately if they are no longer
# available.
docker run -v "${BUILDER_DIR}/rsrc/rpms:/rpms" fedora:20 bash -c \
'yum -y update && yum install --downloadonly --downloaddir=/rpms coreutils gcc gcc-c++ make which && chmod -R 755 /rpms/'
fi

unset SIMICS_BASE
docker build \
--build-arg \
"PUBLIC_SIMICS_PACKAGE_VERSION_1000=${PUBLIC_SIMICS_PACKAGE_VERSION_1000}" \
-t "${IMAGE_NAME}" -f "${BUILDER_DIR}/Dockerfile" "${ROOT_DIR}"
docker create --name "${CONTAINER_NAME}" "${IMAGE_NAME}" bash
docker cp "${CONTAINER_NAME}:/tsffs/linux64/packages/" "${SCRIPT_DIR}/../../"
mkdir -p "${ROOT_DIR}/packages"
docker cp "${CONTAINER_NAME}:/packages" "${ROOT_DIR}/"
docker rm -f "${CONTAINER_NAME}"
1 change: 1 addition & 0 deletions .github/dependabot/2024-02-23.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CVE,Package Name,Severity,Manifest File,Status,CVSS,CVSS Vector,Vulnerable Versions,Fixed Versions,Triaged By,Triage Reason,Triage Comment
3 changes: 3 additions & 0 deletions .github/dependabot/2024-02-23.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[

]
1 change: 1 addition & 0 deletions .github/linters/.markdown-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ MD029: false # Ordered list item prefix
MD033: false # Allow inline HTML
MD036: false # Emphasis used instead of a heading
MD041: false # HTML can be at the top of the file for the image and such
MD045: false # Do not require alt text

#################
# Rules by tags #
Expand Down
Loading

0 comments on commit 7b36aca

Please sign in to comment.