Merge pull request #9 from sifive/priv-1.10-sim
Some small priv-1.10 fixes
This commit is contained in:
commit
239e6b1b8c
6
.gitmodules
vendored
6
.gitmodules
vendored
@ -10,3 +10,9 @@
|
|||||||
[submodule "riscv-gnu-toolchain"]
|
[submodule "riscv-gnu-toolchain"]
|
||||||
path = riscv-gnu-toolchain
|
path = riscv-gnu-toolchain
|
||||||
url = https://github.com/riscv/riscv-gnu-toolchain.git
|
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
25
.travis.yml
Normal 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)
|
39
Makefile
39
Makefile
@ -30,6 +30,14 @@ bbl := $(pk_wrkdir)/bbl
|
|||||||
bin := $(wrkdir)/bbl.bin
|
bin := $(wrkdir)/bbl.bin
|
||||||
hex := $(wrkdir)/bbl.hex
|
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
|
target := riscv64-unknown-linux-gnu
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
@ -82,8 +90,10 @@ $(bbl): $(pk_srcdir) $(vmlinux_stripped)
|
|||||||
mkdir -p $(pk_wrkdir)
|
mkdir -p $(pk_wrkdir)
|
||||||
cd $(pk_wrkdir) && $</configure \
|
cd $(pk_wrkdir) && $</configure \
|
||||||
--host=$(target) \
|
--host=$(target) \
|
||||||
--with-payload=$(vmlinux_stripped)
|
--with-payload=$(vmlinux_stripped) \
|
||||||
CFLAGS="-mabi=lp64d -march=rv64imafdc -DDISABLED_HART_MASK=1" $(MAKE) -C $(pk_wrkdir)
|
--enable-logo \
|
||||||
|
--with-logo=$(abspath conf/sifive_logo.txt)
|
||||||
|
CFLAGS="-mabi=lp64d -march=rv64imafdc" $(MAKE) -C $(pk_wrkdir)
|
||||||
|
|
||||||
$(bin): $(bbl)
|
$(bin): $(bbl)
|
||||||
$(target)-objcopy -S -O binary --change-addresses -0x80000000 $< $@
|
$(target)-objcopy -S -O binary --change-addresses -0x80000000 $< $@
|
||||||
@ -91,6 +101,27 @@ $(bin): $(bbl)
|
|||||||
$(hex): $(bin)
|
$(hex): $(bin)
|
||||||
xxd -c1 -p $< > $@
|
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
|
.PHONY: sysroot vmlinux bbl
|
||||||
sysroot: $(sysroot)
|
sysroot: $(sysroot)
|
||||||
vmlinux: $(vmlinux)
|
vmlinux: $(vmlinux)
|
||||||
@ -99,3 +130,7 @@ bbl: $(bbl)
|
|||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
rm -rf -- $(wrkdir) $(toolchain_dest)
|
rm -rf -- $(wrkdir) $(toolchain_dest)
|
||||||
|
|
||||||
|
.PHONY: sim
|
||||||
|
sim: $(spike) $(bbl)
|
||||||
|
$(spike) -p4 $(bbl)
|
||||||
|
26
conf/sifive_logo.txt
Normal file
26
conf/sifive_logo.txt
Normal 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
1
riscv-fesvr
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit f683e01542acf60e50774d061bcb396b628e3e67
|
1
riscv-isa-sim
Submodule
1
riscv-isa-sim
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 092b464c06d2eba580b95a3ac7013449cb2687e4
|
2
riscv-pk
2
riscv-pk
@ -1 +1 @@
|
|||||||
Subproject commit 66701f82f88d08d3700d8b0bc5d5306abfd0044f
|
Subproject commit 57740d97cdec928c372d8e752c04a691418cbfa1
|
Loading…
Reference in New Issue
Block a user