forked from rarias/nixos-riscv
Add trampoline scripts to CI
This commit is contained in:
30
fpga/run-node.sh
Executable file
30
fpga/run-node.sh
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
#set -x
|
||||
set -e
|
||||
|
||||
echo "Hello from $(hostname)"
|
||||
|
||||
path="$1"
|
||||
|
||||
cd "$path"
|
||||
|
||||
# First kill any picocom instance
|
||||
killall picocom || true
|
||||
|
||||
# Setup the environment
|
||||
. env.sh
|
||||
|
||||
set -x
|
||||
|
||||
# Then perform the boot
|
||||
./fpgactl -w bitstream.bit -R bootrom.bin -b opensbi.bin -k kernel.bin -i initrd.bin # -r rootfs.img
|
||||
|
||||
# Restart it again only loading the bootrom and OpenSBI (notice OpenSBI
|
||||
# relocates itself so it will likely be gone by now)
|
||||
sleep 1 && ./fpgactl -R bootrom.bin -b opensbi.bin &
|
||||
|
||||
# Set dead switch
|
||||
sleep 30 && killall picocom &
|
||||
|
||||
picocom -q -x 10000 -b 115200 $FPGACTL_UART
|
||||
Reference in New Issue
Block a user