mirror of
https://github.com/lukechilds/dockerpi.git
synced 2026-01-23 02:14:37 +00:00
Fix volume issues by mounting a dir
Extract a pre-existing image there if one doesn't already exist
This commit is contained in:
parent
e5ecf4cf75
commit
151aa1f623
2 changed files with 27 additions and 23 deletions
23
entrypoint.sh
Executable file
23
entrypoint.sh
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
|
||||
image_path="/data/filesystem.img"
|
||||
zip_path="/filesystem.zip"
|
||||
|
||||
if [ ! -e $image_path ] && [ -e $zip_path ]; then
|
||||
unzip $zip_path
|
||||
mv *.img $image_path
|
||||
fi
|
||||
|
||||
exec qemu-system-arm \
|
||||
-M versatilepb \
|
||||
-cpu arm1176 \
|
||||
-m 256M \
|
||||
-hda /data/filesystem.img \
|
||||
-net nic \
|
||||
-net user,hostfwd=tcp::5022-:22 \
|
||||
-dtb /root/qemu-rpi-kernel/versatile-pb.dtb \
|
||||
-kernel /root/qemu-rpi-kernel/kernel-qemu-4.19.50-buster \
|
||||
-append "root=/dev/sda2 panic=1" \
|
||||
-no-reboot \
|
||||
-display none \
|
||||
-serial mon:stdio
|
||||
Loading…
Add table
Add a link
Reference in a new issue