My solution involves directly modifying the sys-net VM and I handle
all the modules in sys-net:/rw/config/rc.local.

Is your rc.local executable?

On Wed, Dec 21, 2016 at 9:37 AM, Dave C <qu...@dave-cohen.com> wrote:
> Since starting this thread, I've (belatedly) upgraded to Qubes 3.2.  In doing 
> so, I never figured out how to get the old kernel for which I compiled the wl 
> module to migrate over to the new install.  Unfortunately a VM's kernel is 
> not included when backing it up.
>
> Anyway, I thought of that as an excuse to upgrade my net vm for broadcom to 
> the latest version of fedora.  Unfortunately things are not working 100%.  So 
> while I've made progress, this is actually a call for help to get things 
> working on fedora 24.
>
> # Give the PCI Device Permissive Passthrough (on dom0)
>
> https://www.qubes-os.org/doc/assigning-devices/#pci-passthrough-issues
>
> My /etc/systemd/system/qubes-pre-netvm.service ended up like this:
>
> ```
> [Unit]
> Description=permission pci netvm fixup
> Before=qubes-netvm.servce
>
> [Service]
> Type=oneshot
> RemainAfterExit=yes
> ExecStart=/bin/sh -c 'echo "0000:03:00.0" > 
> /sys/bus/pci/drivers/pciback/permissive'
>
> [Install]
> WantedBy=multi-user.target
> ```
>
> # Preparation to compile modules
>
> Start a VM running same template and kernel version that your netvm
> will use.  This can be a dispvm.
>
> From 
> https://www.broadcom.com/support/download-search/?pf=Wireless+LAN+Infrastructure
>
> Move tarball to that vm (if not there already) and extract with
>
> ```
> tar xvzf hybrid-v25_64-nodebug-nopcoem-6_30_223_271.tar.gz
> ```
>
> Conveniently the README is not included.  You might find it at
> https://docs.broadcom.com/docs/1211168561592, a link which will soon
> be just as broken as all its predecessors scattered all over the
> internet.
>
>
> ## Compile the modules
>
>
> ```
> # Install kernel-devel that matches running kernel!
> sudo yum install "kernel-devel-uname-r == $(uname -r)"
>
> # I think necessary (?)
> sudo modprobe cfg80211
>
> # possibly necessary (?)
> sudo yum install gcc
>
> # Finally
> make
> ```
>
> ## Install
>
> I compiled in a dvm, so my install procedure was...
>
> First, on the dvm where I compiled:
>
> ```
> # Copy the built module
> qvm-copy-to-vm net-powerbook24 wl.ko
>
> # Find out what the install command will be.  Note -n will not actually 
> install.
> make -n install
> ```
>
> Now we can use the command shown by `make -n install` earlier, in the new net 
> vm (net-powerbook24 in my case).
>
> ```
> install -D -m 755 QubesIncoming/disp2/wl.ko /lib/modules/`uname 
> -r`/kernel/drivers/net/wireless
>
> # This is documented in the readme, but not done by the install command.
> depmod -a
> ```
>
> But we want the module to be loaded automatically when the netvm starts.  
> This is the part I'm having trouble with!  If anyone can suggest a better 
> way, please let me know.
>
> Start by using Marek's technique for custom modules.  
> (https://groups.google.com/forum/#!msg/qubes-users/Wt9Nm7posho/msTN_v2oa_oJ)
>
> I've been experimenting with what to put in /rw/config/rc.local.  What I have 
> at the moment is shown below.  But here's the problem...
>
> When first starting the netvm, it does not successfully use the wifi.  
> However, if I manually open a terminal and run `sudo /rw/config/rc.local` 
> then it will be able to connect to wifi.  So, something about this script is 
> working, but not working on initial vm startup!
>
> I have the following in /rw/config/rc.local:
>
> ```
> # Unload conflicting modules.
> rmmod ssb
> rmmod bcma
> rmmod b43
> rmmod brcmsmac
> rmmod wl
>
> # blacklist modules that may interfere with wl (broadcom)
> # (Not convinced these actually prevent the modules from loading!)
> echo "blacklist ssb" >> /etc/modprobe.d/blacklist.conf
> echo "blacklist bcma" >> /etc/modprobe.d/blacklist.conf
> echo "blacklist b43" >> /etc/modprobe.d/blacklist.conf
> echo "blacklist brcmsmac" >> /etc/modprobe.d/blacklist.conf
>
> mount --bind /rw/modules /lib/modules
> systemctl restart systemd-udevd
>
> modprobe wl
> ```
>
> ...and make that rc.local executable.
>
> I've tried various experiments. I've changed the order in that script of when 
> I remove conflicting modules.  Nothing I've tried makes that script work 
> successfully on startup.  I suspect that conflicting modules are loaded 
> despite my attempt to blacklist them.  But when I run the script manually in 
> a terminal, it works as hoped, and I can connect to wifi.  As I said earlier, 
> I'd appreciate any help!
>
> --
> You received this message because you are subscribed to a topic in the Google 
> Groups "qubes-users" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/qubes-users/VVwWqvz5dX4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> qubes-users+unsubscr...@googlegroups.com.
> To post to this group, send email to qubes-users@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/qubes-users/f191cec7-3514-427f-9e78-3ec066b9cec8%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/CADbtXuD7AxghXLf-54qOQ%2BH3TBLdg3Cey%2BbRep1_XGsj2UT7LQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to