-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrpi_gui.sh
More file actions
executable file
·33 lines (26 loc) · 977 Bytes
/
rpi_gui.sh
File metadata and controls
executable file
·33 lines (26 loc) · 977 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
# MacOS Mojave
# brew install qemu
export QEMU=$(which qemu-system-arm)
export TMP_DIR=./
export RPI_KERNEL=${TMP_DIR}/kernel-qemu-4.14.79-stretch
export RPI_FS=${TMP_DIR}/2018-11-13-raspbian-stretch-full.img
export PTB_FILE=${TMP_DIR}/versatile-pb.dtb
export IMAGE_FILE=2018-11-13-raspbian-stretch-full.zip
export IMAGE=https://downloads.raspberrypi.org/raspbian_full_latest
export PORT=${1:-5022}
cd $TMP_DIR
#wget https://github.com/dhruvvyas90/qemu-rpi-kernel/blob/master/kernel-qemu-4.14.79-stretch?raw=true \
# -O ${RPI_KERNEL}
#
#wget https://github.com/dhruvvyas90/qemu-rpi-kernel/raw/master/versatile-pb.dtb \
# -O ${PTB_FILE}
#
#wget $IMAGE
#unzip $IMAGE_FILE
$QEMU -kernel ${RPI_KERNEL} \
-cpu arm1176 -m 256 -M versatilepb \
-dtb ${PTB_FILE} -no-reboot \
-serial stdio -append "root=/dev/sda2 panic=1 rootfstype=ext4 rw" \
-drive "file=${RPI_FS},index=0,media=disk,format=raw" \
-net user,hostfwd=tcp::${PORT}-:22 -net nic \