Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added submodules of cheribuild with certain commits #21

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
[submodule "pebbles"]
path = pebbles
url = https://github.com/blarney-lang/pebbles
[submodule "llvm-project"]
path = llvm-project
url = [email protected]:CTSRD-CHERI/llvm-project.git
[submodule "cheribsd"]
path = cheribsd
url = https://github.com/CTSRD-CHERI/cheribsd
[submodule "qemu"]
path = qemu
url = [email protected]:CTSRD-CHERI/qemu.git
[submodule "gdb"]
path = gdb
url = [email protected]:CTSRD-CHERI/gdb.git
[submodule "cheribuild"]
path = cheribuild
url = [email protected]:CTSRD-CHERI/cheribuild.git
2 changes: 1 addition & 1 deletion Docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | \
RUN printf "\
\nexport LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:\$LIBRARY_PATH \
\n# Basic PATH setup \
\nexport PATH=/home/dev-user/cheri/output/sdk/bin:/workspace/scripts:/home/dev-user/.local/bin:\$PATH:/home/dev-user/.ghcup/bin \
\nexport PATH=/workspace/cheri/output/sdk/bin:/workspace/scripts:/home/dev-user/.local/bin:\$PATH:/home/dev-user/.ghcup/bin \
\n# Thread setup \
\nexport nproc=\$(grep -c ^processor /proc/cpuinfo) \
\n# Terminal color... \
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
PEBBLES_ROOT ?= pebbles
username=$(shell echo ${USER})
user=$(if $(shell id -u),$(shell id -u),9001)
group=$(if $(shell id -g),$(shell id -g),1000)

Expand All @@ -8,13 +9,12 @@ build-docker:

# Enter the docker image
shell: build-docker
docker run -it --shm-size 256m --hostname simtight-ubuntu2204 -u $(user) -v $(shell pwd):/workspace simtight-ubuntu2204:latest /bin/bash
docker run -it --shm-size 256m --hostname simtight-ubuntu2204 -u $(user) -v $(shell pwd):/workspace -v /home/$(username)/.ssh:/home/dev-user/.ssh simtight-ubuntu2204:latest /bin/bash

# Fetch submodules
sync:
git submodule sync
git submodule update --init --recursive
git clone https://github.com/CTSRD-CHERI/cheribuild
git submodule update --recursive

.PHONY: verilog
verilog:
Expand Down
1 change: 1 addition & 0 deletions cheribsd
Submodule cheribsd added at 8993e1
1 change: 1 addition & 0 deletions cheribuild
Submodule cheribuild added at 795bc2
1 change: 1 addition & 0 deletions gdb
Submodule gdb added at f7eb07
1 change: 1 addition & 0 deletions llvm-project
Submodule llvm-project added at 19d402
1 change: 1 addition & 0 deletions qemu
Submodule qemu added at 3771e9
21 changes: 21 additions & 0 deletions scripts/build-cheri.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
# --------------------------------------------------------------------
# This script builds the Cheri-LLVM library
# --------------------------------------------------------------------

set -o errexit
set -o pipefail
set -o nounset

# The absolute path to the directory of this script.
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
SIMTIGHT=${SCRIPT_DIR}/..

cd $SIMTIGHT/cheribuild && \
./cheribuild.py sdk-riscv64-purecap \
--llvm/source-directory ../llvm-project \
--cheribsd/source-directory ../cheribsd \
--gdb/source-directory ../gdb \
--run/custom-qemu-path ../qemu \
--source-root ../cheri