feat: android-x86
This commit is contained in:
parent
aca9cb6bde
commit
ceef751695
18
android-x86/create.sh
Normal file
18
android-x86/create.sh
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash -e
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
. ../lib.sh
|
||||||
|
|
||||||
|
if ! [ -f android.iso ]; then
|
||||||
|
ask_yn "android.iso not found, download?" \
|
||||||
|
&& bash ./download_isos.sh \
|
||||||
|
|| exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
qemu-img create -f qcow2 hda.qcow2 40G
|
||||||
|
|
||||||
|
CMD=(
|
||||||
|
"${CMD[@]}"
|
||||||
|
-drive file=android.iso,media=cdrom,readonly=on
|
||||||
|
)
|
||||||
|
|
||||||
|
"${CMD[@]}"
|
5
android-x86/download_isos.sh
Executable file
5
android-x86/download_isos.sh
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
android='https://sourceforge.net/projects/android-x86/files/latest/download'
|
||||||
|
|
||||||
|
curl -LC- -o android.iso "$android"
|
19
android-x86/run.sh
Executable file
19
android-x86/run.sh
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash -e
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
. ../lib.sh
|
||||||
|
|
||||||
|
if ! [ -f hda.qcow2 ]; then
|
||||||
|
ask_yn "hda.qcow2 not found, create?" \
|
||||||
|
&& bash ./create.sh \
|
||||||
|
|| exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
CMD=(
|
||||||
|
"${CMD[@]}"
|
||||||
|
-nic user,model=virtio-net-pci
|
||||||
|
-vga std
|
||||||
|
# USB passthrough, might need root privileges
|
||||||
|
#-device usb-host,vendorid=0xffff,productid=0xffff
|
||||||
|
)
|
||||||
|
|
||||||
|
"${CMD[@]}"
|
Loading…
Reference in New Issue
Block a user