build & run cartesi machine
parent
c5c4c696dc
commit
8ada4f0c16
|
@ -10,3 +10,7 @@ src/-lstdc++.res
|
||||||
# Neural network for the NNUE evaluation
|
# Neural network for the NNUE evaluation
|
||||||
**/*.nnue
|
**/*.nnue
|
||||||
|
|
||||||
|
# Cartesi binaries
|
||||||
|
cartesi/img/stockfish
|
||||||
|
cartesi/stockfish.ext2
|
||||||
|
|
||||||
|
|
37
README.md
37
README.md
|
@ -20,14 +20,40 @@ riscv64-cartesi-linux-gnu-gcc
|
||||||
# Build
|
# Build
|
||||||
Note, the Makefile kludge disables things like "tests".
|
Note, the Makefile kludge disables things like "tests".
|
||||||
|
|
||||||
Run:
|
Run this to build stockfish binary for riscv64 using Cartesi GCC toolchain:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
cd src
|
||||||
make -j build ARCH=riscv64 COMP=riscv64-cartesi-linux-gnu-gcc COMPCXX=riscv64-cartesi-linux-gnu-g++
|
make -j build ARCH=riscv64 COMP=riscv64-cartesi-linux-gnu-gcc COMPCXX=riscv64-cartesi-linux-gnu-g++
|
||||||
```
|
```
|
||||||
|
|
||||||
|
# Build Disk Images for Cartesi Emulator
|
||||||
|
|
||||||
|
```
|
||||||
|
# Go back to top level directory in this git repo:
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
# Copy newly built stockfish for cartesi disk image:
|
||||||
|
cp -p src/stockfish cartesi/img/stockfish
|
||||||
|
|
||||||
|
# Make 64 megabyte ext2 disk image with stockfish and shell script
|
||||||
|
genext2fs -b 65536 -d cartesi/img cartesi/stockfish.ext2
|
||||||
|
```
|
||||||
|
|
||||||
# Run Stockfish in Emulator
|
# Run Stockfish in Emulator
|
||||||
TODO XXX
|
To run the disk images, using upstream rootfs:
|
||||||
|
|
||||||
|
```
|
||||||
|
# XXX too much memory, but default 64 megs isn't enough.
|
||||||
|
# Lower it & test.
|
||||||
|
|
||||||
|
cartesi-machine \
|
||||||
|
--ram-length=512Mi \
|
||||||
|
--flash-drive=label:stockfish,filename:cartesi/stockfish.ext2 \
|
||||||
|
--flash-drive=label:root,filename:/opt/cartesi/share/images/rootfs.ext2 \
|
||||||
|
-- /mnt/stockfish/stockfish.sh
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
# Upstream
|
# Upstream
|
||||||
See:
|
See:
|
||||||
|
@ -47,3 +73,10 @@ See:
|
||||||
|
|
||||||
# Copying
|
# Copying
|
||||||
Same as upstream Stockfish, GPL v3.
|
Same as upstream Stockfish, GPL v3.
|
||||||
|
|
||||||
|
# Contact
|
||||||
|
```
|
||||||
|
# y@deepcrayon.fish or jebba in Cartesi/Stockfish discord
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Stockfish running under Cartesi virtual machine"
|
||||||
|
echo
|
||||||
|
|
||||||
|
echo uci | /mnt/stockfish/stockfish
|
||||||
|
|
||||||
|
exit
|
||||||
|
|
Loading…
Reference in New Issue