Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
c9a63b35
Commit
c9a63b35
authored
Oct 05, 2021
by
George Hotz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't waste ram loading symbols
parent
efd22ad0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
6 deletions
+15
-6
build.sh
risc/build.sh
+4
-0
compare.sh
risc/compare.sh
+1
-1
run.py
risc/run.py
+10
-5
No files found.
risc/build.sh
View file @
c9a63b35
...
...
@@ -16,4 +16,8 @@ cp go-ethereum ../risc/go-ethereum
cd
../risc
file go-ethereum
# optional (doesn't work because of replacements)
#/usr/local/opt/llvm/bin/llvm-strip go-ethereum
#file go-ethereum
#GOOS=linux GOARCH=mips go build test.go
risc/compare.sh
View file @
c9a63b35
#!/bin/bash
#!/bin/bash
-e
echo
"compiling"
./build.sh
COMPILE
=
1 ./run.py
...
...
risc/run.py
View file @
c9a63b35
...
...
@@ -287,11 +287,6 @@ elf.seek(0)
#rte = data.find(b"\x08\x02\x2c\x95")
#print(hex(rte))
# program memory (16 MB)
prog_size
=
(
len
(
data
)
+
0xFFF
)
&
~
0xFFF
mu
.
mem_map
(
0
,
prog_size
)
print
(
"malloced 0x
%
x for program"
%
prog_size
)
# heap (256 MB) @ 0x20000000
mu
.
mem_map
(
heap_start
,
256
*
1024
*
1024
)
...
...
@@ -310,6 +305,16 @@ mu.mem_write(0x30000000, inputs)
# regs at 0xC0000000 in merkle
elffile
=
ELFFile
(
elf
)
end_addr
=
0
for
seg
in
elffile
.
iter_segments
():
end_addr
=
max
(
end_addr
,
seg
.
header
.
p_vaddr
+
seg
.
header
.
p_memsz
)
# program memory (16 MB)
prog_size
=
(
end_addr
+
0xFFF
)
&
~
0xFFF
mu
.
mem_map
(
0
,
prog_size
)
print
(
"malloced 0x
%
x for program"
%
prog_size
)
for
seg
in
elffile
.
iter_segments
():
print
(
seg
.
header
,
hex
(
seg
.
header
.
p_vaddr
))
mu
.
mem_write
(
seg
.
header
.
p_vaddr
,
seg
.
data
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment