Last active
September 5, 2023 21:40
-
-
Save pr1ntf/fb62e316b3007f55590d2397a08b0e52 to your computer and use it in GitHub Desktop.
Get 9front (Plan9 fork) booted under FreeBSD bhyve
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
#!/bin/sh | |
# Yet Another bhyve Script v0.4 | |
# Use this to try and boot 9front, the Plan9 fork. | |
# Virtio emulation works better (ported drivers) | |
# PS/2 Mouse emulation requires updated bhyve(8) | |
# If you don't have it, patch is uploaded with this Gist | |
# When partitioning, I have had more success with MBR | |
# GPT may work for some people | |
name=9front | |
ram=512M | |
cpu=1 | |
disk=9front.img | |
media=9front-5561.df1dc1ff2475.iso | |
mediatype=cd | |
blkemu=virtio-blk | |
tap=tap33 | |
fw=BHYVE_UEFI.fd | |
ip=127.0.0.1 | |
port=5910 | |
w=wait | |
sw=800 | |
sh=600 | |
# Stuff not needed for testing | |
# -s 17,xhci,tablet \ | |
bhyve \ | |
-c ${cpu} -m ${ram} \ | |
-H -w \ | |
-s 0,hostbridge \ | |
-s 1,ahci-${mediatype},${media} \ | |
-s 2,${blkemu},${disk} \ | |
-s 4,virtio-net,${tap} \ | |
-s 8,fbuf,tcp=${ip}:${port},${w},w=${sw},h=${sh} \ | |
-s 31,lpc \ | |
-l bootrom,${fw} \ | |
${name} & |
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
--- ps2mouse.c (revision 311582) | |
+++ ps2mouse.c (working copy) | |
@@ -171,7 +171,9 @@ | |
val0 = sc->status & (PS2M_STS_LEFT_BUTTON | | |
PS2M_STS_RIGHT_BUTTON | PS2M_STS_MID_BUTTON); | |
- | |
+ // PG | |
+ val0 |= 0x08; | |
+ | |
if (sc->delta_x >= 0) { | |
if (sc->delta_x > 255) { | |
val0 |= (1 << 6); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note the
ps2mousefix.patch
should be merged into HEAD already so you no longer need to patch.