Skip to content

Instantly share code, notes, and snippets.

@pr1ntf
Last active January 29, 2019 20:55
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pr1ntf/aef64d88e2608da507b0de020eb09ecd to your computer and use it in GitHub Desktop.
Save pr1ntf/aef64d88e2608da507b0de020eb09ecd to your computer and use it in GitHub Desktop.
Booting Android-x86 under FreeBSD bhyve (Work in progress)
#!/bin/sh
# Yet Another bhyve Script v0.3
# Use this example to boot Android-x86
# Have not tested e1000 network emulation yet
# It will install to hd, but will get stuck in boot loop
# This should get you through the setup in live mode
# Be sure to kldload vmm
name=droid86
ram=1024M
cpu=1
disk=droid86.img
media=android-x86_64-6.0-r1.iso
mediatype=cd
tap=tap42
fw=BHYVE_UEFI.fd
ip=127.0.0.1
port=5901
wa=wait
w=800
h=600
# Extra slots not used for testing purposes
# -s 2,ahci-hd,${disk} \
# -s 8,virtio-net,${tap} \
# -s 17,xhci,tablet \
bhyve \
-c ${cpu} -m ${ram} \
-H -w \
-s 0,hostbridge \
-s 1,ahci-${mediatype},${media} \
-s 16,fbuf,tcp=${ip}:${port},${wa} \
-s 31,lpc \
-l bootrom,${fw} \
${name} &
@peterg-ts
Copy link

peterg-ts commented Dec 15, 2016

Hmmm, surprised that worked: the lpc device is really tied to slot 31 when using UEFI. Did the ps2 mouse work ?

@pr1ntf
Copy link
Author

pr1ntf commented Dec 15, 2016

Yes the PS2 mouse worked, albeit it didn't quite sync right. I tried the tablet interface but it doesn't work very well for menus.

I first tried to force the resolution to 800x600 but it would get stuck in a boot loop. Definitely needs some work but this is a start :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment