wm: doc

Download patch

ref: 3e7e2523e0bcfd67ca76264b32fa62a72743bfbe
parent: 42bc67bfdd9d9eb2bed8a643bcedd0c8416ad75c
author: Aaron Lin <jrmu@inter9.org>
date: Wed Oct 30 00:40:45 EDT 2024

Provide instructions for wifi

--- a/cpu-p9.ms
+++ b/cpu-p9.ms
@@ -11,11 +11,24 @@
 term% mkdir /cfg/$sysname/
 term% dircp /cfg/example /cfg/$sysname/
 
-Then, edit /cfg/$sysname/cpurc to uncomment this line:
+Now, we need to configure networking:
 
-# ip/ipconfig -g your-gateway ether /net/ether0 your-ip-address your-subnet-mask
+If you have static networking (eg, you have a virtual private server),
+edit /cfg/$sysname/cpurc to uncomment this line:
 
-Note: You may also want to copy this to /cfg/$sysname/termrc and also to run the
+ip/ipconfig -g your-gateway ether /net/ether0 your-ip-address your-subnet-mask
+
+If you are using wifi and dynamic networking, you may need to add these lines:
+
+bind -a '#l1' /net
+echo 'key proto=wpapsk essid=ESSID !password='^`{cat /lib/wpa/ESSID} > /mnt/factotum/ctl
+aux/wpa -2 -s 'ESSID' /net/ether1
+ip/ipconfig ether /net/ether1
+
+Replace ESSID and make sure to store the wifi password in /lib/wpa/ESSID.
+For wifi on Raspberry Pi boards, see rpi-wifi-p9.
+
+Note: You may also want to copy these lines to /cfg/$sysname/termrc and also to run the
 command manually, because by default, plan 9 runs as a terminal service. It will not
 run as a cpu service until the cpu kernel has been compiled as described below.