Plan 9: Intel Wireless 3165
Intel Wireless 3165 internal PCI card works with Plan 9. You'll need firmware blob /lib/firmware/iwlwifi-7265D-29.ucode from Linux as /lib/firmware/iwlwifi-7265D-29 in Plan 9.
Detect hardware on Linux
02:00.0 Network controller [0280]: Intel Corporation Wireless 3165 [8086:3165] (rev 81)
# vendor_id=8086
# device_code=3165
Detect firmware on Linux
[ 6.062085] iwlwifi 0000:02:00.0: loaded firmware version 29.f2390aa8.0 7265D-29.ucode op_mode iwlmvm
Apply the following patch to etheriwl.c and rebuild kernel (cd /sys/src/9/pc64 && mk install). The kernel should be copied to /n/9fat (9fat partition - use 9fs 9fat).
family = 9000;
fwname = "iwm-9260-34";
break;
+ case 0x3165: /* Wireless AC 3165 */
+ family = 7000;
+ fwname = "iwlwifi-7265D-29";
+ break;
}
ctlr = malloc(sizeof(Ctlr));
If wifi is the only network interface, rio startup will take time since the system is trying to get a network connection and it can't connect without a password. You might want to add a key for the AP in the factotum after the boot process.
List Access Points (AP)
essid:
bssid:
status: associated
channel: 01
rxkey2: ccmp:[16]
rxkey4: ccmp:[16]
txkey0: ccmp:[16]
brsne: 30140100000FAC040100000FAC040100000FAC020C00
node: b4861863011a 1411 191960 07 - Shiva Shakti Niwas -
node: b486187867ca 1411 191950 07 Tataplay
Connect to AP Tataplay prompting for a password
status: need authentication
rsne: 30140100000FAC040100000FAC040100000FAC020000
!Adding key: essid=Tataplay proto=wpapsk
password:
Obtain an IP address
Now you should be able to access the internet.
Multiple Network Interfaces
If you have multiple network interfaces, only the first available is initialized. To configure others on boot, add all the needed interfaces in plan9.ini.
For configuring after the boot process, use bind command to create the /net/ether1 directory. #l<n> will create /net/ether<n> when available.
Explanation
Ethernet driver files are named as ether<manufacturer identifier>.c . During build, all the <filename>link() methods are collected in links() method in pc64.c [generated from pc64] for initialization. devether.c contains generic methods for ethernet drivers. dev.c defines a generic device.
Plan 9 supports MaxEther (64) number of network cards in a system.
Device Driver Development Setup
If you are developing or debugging drivers for an OS different from your current one, QEMU provides direct access to the host hardware via PCI Passthrough [1].
Verify if PCI passthrough is supported by the kernel.
vendor_id=8086
device_code=3165
export slot_info vendor_id device_code
echo $vendor_id $device_code > /sys/bus/pci/drivers/vfio-pci/new_id
echo $slot_info > /sys/bus/pci/devices/$slot_info/driver/unbind
echo $slot_info > /sys/bus/pci/drivers/vfio-pci/bind
Unbind device from guest.
echo 1 > /sys/bus/pci/rescan
libvirt provides a convenient frontend virt-manager (and API if you are so inclined) to QEMU. Since device access requires root privilege, add the following to /etc/libvirt/qemu.conf.
group = "root"
PCI passthrough can be configured via UI or by adding following to <devices> section in domain XML.
<hostdev mode='subsystem' type='pci' managed='yes'>
<source>
<address domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
</source>
</hostdev>
Some useful commands for libvirt.
virt-viewer -c qemu:///system plan9
References
Comments
Post a Comment