Merge pull request #9 from sifive/priv-1.10-sim

Some small priv-1.10 fixes
This commit is contained in:
Palmer Dabbelt 2017-11-06 11:20:07 -08:00 committed by GitHub
commit 239e6b1b8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 97 additions and 3 deletions

6
.gitmodules vendored
View File

@ -10,3 +10,9 @@
[submodule "riscv-gnu-toolchain"]
path = riscv-gnu-toolchain
url = https://github.com/riscv/riscv-gnu-toolchain.git
[submodule "riscv-isa-sim"]
path = riscv-isa-sim
url = https://github.com/riscv/riscv-isa-sim.git
[submodule "riscv-fesvr"]
path = riscv-fesvr
url = https://github.com/riscv/riscv-fesvr.git

25
.travis.yml Normal file
View File

@ -0,0 +1,25 @@
addons:
apt:
packages:
- autoconf
- automake
- autotools-dev
- bc
- bison
- build-essential
- curl
- flex
- gawk
- gperf
- libgmp-dev
- libmpc-dev
- libmpfr-dev
- libtool
- patchutils
- texinfo
before_install:
- export MAKEFLAGS="-j3"
install: true
script:
- true
# - (make > /dev/null) || (make -j1 && exit 1)

View File

@ -30,6 +30,14 @@ bbl := $(pk_wrkdir)/bbl
bin := $(wrkdir)/bbl.bin
hex := $(wrkdir)/bbl.hex
fesvr_srcdir := $(srcdir)/riscv-fesvr
fesvr_wrkdir := $(wrkdir)/riscv-fesvr
libfesvr := $(fesvr_wrkdir)/prefix/lib/libfesvr.so
spike_srcdir := $(srcdir)/riscv-isa-sim
spike_wrkdir := $(wrkdir)/riscv-isa-sim
spike := $(spike_wrkdir)/prefix/bin/spike
target := riscv64-unknown-linux-gnu
.PHONY: all
@ -82,8 +90,10 @@ $(bbl): $(pk_srcdir) $(vmlinux_stripped)
mkdir -p $(pk_wrkdir)
cd $(pk_wrkdir) && $</configure \
--host=$(target) \
--with-payload=$(vmlinux_stripped)
CFLAGS="-mabi=lp64d -march=rv64imafdc -DDISABLED_HART_MASK=1" $(MAKE) -C $(pk_wrkdir)
--with-payload=$(vmlinux_stripped) \
--enable-logo \
--with-logo=$(abspath conf/sifive_logo.txt)
CFLAGS="-mabi=lp64d -march=rv64imafdc" $(MAKE) -C $(pk_wrkdir)
$(bin): $(bbl)
$(target)-objcopy -S -O binary --change-addresses -0x80000000 $< $@
@ -91,6 +101,27 @@ $(bin): $(bbl)
$(hex): $(bin)
xxd -c1 -p $< > $@
$(libfesvr): $(fesvr_srcdir)
rm -rf $(fesvr_wrkdir)
mkdir -p $(fesvr_wrkdir)
mkdir -p $(dir $@)
cd $(fesvr_wrkdir) && $</configure \
--prefix=$(dir $(abspath $(dir $@)))
$(MAKE) -C $(fesvr_wrkdir)
$(MAKE) -C $(fesvr_wrkdir) install
touch -c $@
$(spike): $(spike_srcdir) $(libfesvr)
rm -rf $(spike_wrkdir)
mkdir -p $(spike_wrkdir)
mkdir -p $(dir $@)
cd $(spike_wrkdir) && $</configure \
--prefix=$(dir $(abspath $(dir $@))) \
--with-fesvr=$(dir $(abspath $(dir $(libfesvr))))
$(MAKE) -C $(spike_wrkdir)
$(MAKE) -C $(spike_wrkdir) install
touch -c $@
.PHONY: sysroot vmlinux bbl
sysroot: $(sysroot)
vmlinux: $(vmlinux)
@ -99,3 +130,7 @@ bbl: $(bbl)
.PHONY: clean
clean:
rm -rf -- $(wrkdir) $(toolchain_dest)
.PHONY: sim
sim: $(spike) $(bbl)
$(spike) -p4 $(bbl)

26
conf/sifive_logo.txt Normal file
View File

@ -0,0 +1,26 @@
SIFIVE, INC.
5555555555555555555555555
5555 5555
5555 5555
5555 5555
5555 5555555555555555555555
5555 555555555555555555555555
5555 5555
5555 5555
5555 5555
5555555555555555555555555555 55555
55555 555555555 55555
55555 55555 55555
55555 5 55555
55555 55555
55555 55555
55555 55555
55555 55555
55555 55555
555555555
55555
5
SiFive RISC-V Coreplex

1
riscv-fesvr Submodule

@ -0,0 +1 @@
Subproject commit f683e01542acf60e50774d061bcb396b628e3e67

1
riscv-isa-sim Submodule

@ -0,0 +1 @@
Subproject commit 092b464c06d2eba580b95a3ac7013449cb2687e4

@ -1 +1 @@
Subproject commit 66701f82f88d08d3700d8b0bc5d5306abfd0044f
Subproject commit 57740d97cdec928c372d8e752c04a691418cbfa1