Manually Backporting Drivers?

My laptop uses the RTL8188EE chipset for WiFi, which recently landed support in FreeBSD with this commit.

I'd like to be able to use this new driver on my laptop while remaining as close to a "stable" system as possible. What's the best way to go about doing this? I'm not sure if the driver currently only exists in 13-CURRENT or if its been backported to 12-STABLE, if I can fairly easily build it into a 12.0-RELEASE system by compiling the kernel from source, or what.

I don't really have the time to constantly tinker with a system that can crash on me at any moment (I'm a student in college), so staying as close to an official release as possible is important for me. I'm willing to put in some work at the beginning to get things working, though.
 
An easy (for some values of "easy") way to test if it works:
0. download source for the FreeBSD version you are running
1. build world per the procedure in the handbook (to verify that you have a working setup)
2. add the necessary patches and files from the commit in question
3. perform the 'make kernel' step of build world - if it succeeds, proceed with next step
4. test the new kernel, and see if your network chip works

If it doesn't go back to the previous kernel.
 
I would put this at the top of my list: Contact Farhan and ask him if there are any blockers to adding this to earlier versions.
Might save you some legwork.

Also I see MFC - 4 days.
What does that mean exactly? Will it 'Merge from Current' to FreeBSD12 Stable In 4 days time?
 
In other words is there a way to tell if this was merged to Stable?

This gave me the idea to try manually browsing the SVN repository for 12-STABLE and found this commit. I did not find the same commit in 12.0-RELEASE, though, so it looks like I'd have to run 12-STABLE to get the new driver.

I would put this at the top of my list: Contact Farhan and ask him if there are any blockers to adding this to earlier versions.
Might save you some legwork.

I may do that.

Another question, then, is how safe is it to run a STABLE release? The handbook is careful to remind that it's still a development branch, just slower-moving than CURRENT. So is it similar to running, say, Arch Linux? Debian Testing or Unstable? More specifically, if I'm passively paying attention to the freebsd-stable and/or svn-src-stable-12 mailing lists, how likely is it my system will crash on me?
 
I haven't tried this myself (never needed to use something from -STABLE), but if someone could hop in to verify feasability it'd be appreciated:

You might try compiling 12-STABLE and copy the module for your network card without installing the entire new kernel. Assuming the ABI is still compatible (very likely),
I think this should actually just work. It's a bit hackish though, but that way you'd keep the RELEASE kernel with just an extra/modified driver.
 
You might try compiling 12-STABLE and copy the module for your network card without installing the entire new kernel. Assuming the ABI is still compatible (very likely),
I think this should actually just work. It's a bit hackish though, but that way you'd keep the RELEASE kernel with just an extra/modified driver.

That sounds like it would theoretically work, but I find myself wondering if mixing modules isn't asking for more trouble than running entirely 12-STABLE.

To be fair, running 12-STABLE sounds like a good way to give back to FreeBSD, so long as any odd issues don't interfere with me getting homework done for classes.
 
Well, since you'd have to build 12-STABLE anyway I guess it's worth a shot. No need to replace more than strictly needed if it's stable.
 
I need to ammend that. releng contains security patches and regular patches. Just not new drivers.
These drivers will hit in FreeBSD 12.1
 
I need to ammend that. releng contains security patches and regular patches. Just not new drivers.
These drivers will hit in FreeBSD 12.1

Looks like I'm going to try running 12-STABLE for a bit and, if the drivers work, eventually switch to using 12.1-RELEASE when it gets released.

Thanks everyone for helping me figure this out.
 
In short, after a release everything went from -STABLE to releng until the next RELEASE, what include dot RELEASEs. But yeah, revisons (aka -pNUMBER) are not supposed to bring new features but fixes, mostly security ones.
 
That sounds like it would theoretically work, but I find myself wondering if mixing modules isn't asking for more trouble than running entirely 12-STABLE.

The difficulty with mixing is: it it works, its fine, but if it does strange things, you just dont know if it happens because there is a flaw in it, or if it happens because of mixing. If you go for full -STABLE installation, then you can report flaws to the developers, and that may help all parties.
I was running my machines on -STABLE for long times without any problems. It is a matter of luck and it all depends on the very moment when you grab the sources: it may be something that is perfectly fine, or it may be something that is a bit unpleasant to operate.
 
Back
Top