-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
152 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/sh | ||
|
||
set -eu | ||
|
||
LOAD_STATE="" | ||
|
||
if qemu-img snapshot -l /opt/root/rootfs.qcow2 | grep main > /dev/null | ||
then | ||
LOAD_STATE="-loadvm main" | ||
fi | ||
|
||
echo "Staring..." | ||
qemu-system-arm \ | ||
-machine mcimx7d-sabre \ | ||
-cpu cortex-a9 \ | ||
-smp 2 \ | ||
-m 2048 \ | ||
-kernel /opt/zImage \ | ||
-dtb /opt/imx7d-rm.dtb \ | ||
-drive if=sd,file=/opt/root/rootfs.qcow2,format=qcow2,index=2 \ | ||
-append "console=ttymxc0 rootfstype=ext4 root=/dev/mmcblk1p2 rw rootwait init=/sbin/init" \ | ||
-nic user,hostfwd=tcp::22-:22,hostfwd=tcp::8888-:8888 \ | ||
-monitor tcp::5555,server=on,wait=off \ | ||
-parallel null -display none \ | ||
$LOAD_STATE \ | ||
"$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/sh | ||
|
||
set -eux | ||
|
||
# Start the VM | ||
run_vm.sh -serial null -daemonize | ||
|
||
# Make sure it's up | ||
ssh -o StrictHostKeyChecking=no root@localhost 'true' | ||
|
||
# Launch the TCP forwarding server | ||
ssh -o StrictHostKeyChecking=no root@localhost './rm2fb-forward' & | ||
|
||
# Make sure the server is running by waiting a bit :( | ||
sleep 5 | ||
|
||
# Connect using the FB emulator | ||
rm2fb-emu 127.0.0.1 8888 & | ||
|
||
# Start xochitl | ||
ssh -o StrictHostKeyChecking=no root@localhost 'LD_PRELOAD=/home/root/librm2fb_client.so /usr/bin/xochitl' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
echo 'savevm main' | nc -N 127.0.0.1 5555 | ||
echo 'quit' | nc -N 127.0.0.1 5555 |