I tried following[1]: I opened the boot partition of the sdcard and copied cmdline-wifi.txt -> cmdline.txt

$ cat cmdline.txt
readparts=1 nvram=#S/sdM0/nvram ether1=type=4330

I don't understand these options, so I did not change anything. Booting Plan9 gets stuck on the console: https://imgur.com/lqL8V3z.

What exact changes do I need to make to be able to connect to a WiFi network with WPA2?

Thanks!

[1]: https://www.raspberrypi.org/forums/viewtopic.php?t=219401