Live data from Hacker News

FreeBSD doesn't have Wi-Fi driver for my old MacBook, so AI built one for me

vladimir.varank.in

191–200 of 397 posts

Re: FreeBSD doesn't have Wi-Fi driver for my old MacBook, so AI built one for me

#191

I know this is me coming from my spoiled perspective of Linux and macOS, but the advice of running a VM that manages the WiFi hardware and passing it back to the OS seems insane to me

Qubes OS is the Linux version of this concept. Hardware and their drivers get VMs for security boundary isolation.

Re: FreeBSD doesn't have Wi-Fi driver for my old MacBook, so AI built one for me

#192

The future is that people stop buying software and just build it themselves. The spam filter in thunderbird was broken for me, I built my own in hours and it works way better. Oh that CRM doesn’t have the features you want? Build one that does. It will become very easy to built and deploy solutions to many of your own bespoke problems.

What I want is to be able to use AI to modify the software we already have. Granted I've wanted to do that long before AI, but now maybe plugins will get more popular again now that AI could write them for us

Re: FreeBSD doesn't have Wi-Fi driver for my old MacBook, so AI built one for me

#194

I know this is me coming from my spoiled perspective of Linux and macOS, but the advice of running a VM that manages the WiFi hardware and passing it back to the OS seems insane to me

Computers are so complicated right now that they're literally a network of computers. When you consider the closed firmware issue, using a VM is like having a small router you connect with ethernet. And I believe you could run such VM with 64MB of RAM.

Re: FreeBSD doesn't have Wi-Fi driver for my old MacBook, so AI built one for me

#195
post #44
post #17

Earlier quoted context omitted.

The primary reason why it worked is because Claude could rip off the Linux driver. Without any prior work to rely on, how will the AI figure out proprietary hardware?

He also mentioned it took 2 months. I’m actually wondering how long it would take to do the Linux to BSD port by eyeball, or at least ai assisted. Probably not that much longer? I guess it depends on wall time vs real time.

Most hardware drivers are simpler than people expect. The hardware is usually designed to do the sensible thing in a straightforward way, and you're just translating what the OS wants into a bunch of bits you need to write to the right hardware register.

On the flip side, the perceived barrier is high. Most folks don't have an intuitive sense of how the kernel or "bare metal" environment differs from userland. How do you allocate memory? Can you just printf() a debug message? How to debug if it freezes or crashes? All of these questions have pretty straightforward answers, but it means you need to set aside time to learn.

So, I wouldn't downplay the value of AI for the same reason I wouldn't downplay it with normal coding. It doesn't need to do anything clever to be useful.

That said, for the same reasonss, it's harder to set up a good agent loop here, and the quality standard you're aiming for must be much higher than with a web app, because the failure mode isn't a JavaScript error, but possibly a hard hang.

Re: FreeBSD doesn't have Wi-Fi driver for my old MacBook, so AI built one for me

#196
post #2

I feel like ubiquitous hardware support in every OS is going to be a solved problem soon. We're very close to just being able to set an AI coding agent to brute-force a driver for anything. The hardware designer would have to go well out of their way to obfuscate the interface if they really wanted to forbid it, instead of just not bothering to support an OS like BSD or Linux.

Hardware driver bugs frequently manifest as concurrency flakiness or heisenbugs. AI is notoriously bad at dealing with bugs that only cause problems every few weeks.

I've found ai really good at the rare problems. The code hangs 1 out of 200 times - it spends half an hour and finds a race condition and a proposed fix - something complex that is really difficult for humans to figure out. Now grated the above problem took a dozen rounds over a couple days to completly solve (and it happend more often than every two weeks), but it was able to find an answer given symptoms.

Re: FreeBSD doesn't have Wi-Fi driver for my old MacBook, so AI built one for me

#197
post #85

Earlier quoted context omitted.

GPL is not a patent. It covers the work and _derivatives_; it does not cover ideas or general knowledge. The chip in question has docs. I fully expect that Claude wrote code that does not resemble that of the driver in the Linux tree. TFA is taking on some liability if it turns out that the code Claude wrote does largely resemble GPL'ed code, but if TFA is not comfortable with the code written by Claude not resemblin…

Except... In this case, they didn't really work from the chip's published documentation. They instead ultimately used a sorta-kinda open-book clean-room method, wherein they generated documentation using the source code of the GPL'd Linux driver and worked from that. That said: I don't have a dog in this race. I don't really have an opinion of whether this is quite fine or very-much not OK. I don't know if this is so…

As I mentioned in another comment, the original referenced source code from the Linux kernel is ISC'd, not GPL'd. See here: https://github.com/torvalds/linux/blob/master/drivers/net/wi...

I don't work on the Linux kernel, but I do poke around the sources from time to time. I was genuinely surprised to see that some hardware drivers are not GPL'd. That is news to me, but makes commercial sense to when I think deeper about it. When these manufacturers donate a driver to Linux, I don't think GPL is a priority to them. In the case of Broadcom, they probably want their WiFi hardware to more compatible with SBCs to drive sales (of future SBCs that use their WiFi hardware and run Linux). If anything, choosing a more liberal license (ISC) increases the likelihood that their Linux driver will be ported to other operating systems. From Broadcom's commercial view, that is a win to sell more SBCs (free labour from BSDers!).

Also, if the original driver was GPL'd, I am pretty sure it is fair game (from US copyright and software license perspective) to use one LLM to first reverse engineer the GPL'd driver to write a spec. Then use a different LLM to implement a new driver for FreeBSD that is ISC'd. You can certainly do that with human engineers, and I see no reason to believe that US courts would object to separate LLMs being used in the two necessary steps above. Of course, this assumes good faith on the part of the org doing the re-write. (Any commercial org doing this would very carefully document the process, expecting a legal challenge.)

I do think this blog post introduces a genuinely (to me!) novel way to use LLMs. My favourite part of that blog post was talking about all of the attempts that did not work, and new approaches that were required. That sounds pretty similar to my experience as a software engineer. You start with preconceived notions that frequently shattered after you walk down a long and arduous path to discovering your mistakes. Then you stop, re-think things, and move in a new intellectual (design) direction. His final solution of asking LLMs to write a spec, then asking other LLMs to proof-read it is highly ingenious. I am really impressed. Please don't view that "really impressed" as my thinking that the whole world will move to vibe coding; rather I think this is a real achievement that deserves some study by us human engineers.

Re: FreeBSD doesn't have Wi-Fi driver for my old MacBook, so AI built one for me

#198
post #2

I feel like ubiquitous hardware support in every OS is going to be a solved problem soon. We're very close to just being able to set an AI coding agent to brute-force a driver for anything. The hardware designer would have to go well out of their way to obfuscate the interface if they really wanted to forbid it, instead of just not bothering to support an OS like BSD or Linux.

I think we're closer than most people realize, but the hard part isn't generating the code — it's testing it. Drivers need to handle edge cases that only show up under specific hardware conditions, timing issues, power states, etc. An AI can write a first draft pretty fast, but validating it still requires actual hardware in the loop. The FreeBSD case worked because brcmfmac is well-documented and the author could test on real hardware. For more obscure chipsets with no public datasheets, we're still stuck.

Re: FreeBSD doesn't have Wi-Fi driver for my old MacBook, so AI built one for me

#199

The future is that people stop buying software and just build it themselves. The spam filter in thunderbird was broken for me, I built my own in hours and it works way better. Oh that CRM doesn’t have the features you want? Build one that does. It will become very easy to built and deploy solutions to many of your own bespoke problems.

This feels like when 3D printers hit the consumer market and everyone declared that buying things was over, everyone will just print them at home. There's tons of benefits to standardised software too. Companies rely on the fact they can hire people who already know photoshop/xero/webpack/etc rather than having to train them from scratch on in house tools.

Business software is also useful because it gives companies a process to follow that even if not optimal, is probably better than what they’d come up with on their own.

Re: FreeBSD doesn't have Wi-Fi driver for my old MacBook, so AI built one for me

#200

Earlier quoted context omitted.

> Someone with domain knowledge could also just write the code instead of trying to get the stochastic prediction machine to generate it. Well, people with the domain knowledge exist, yet they have not yet written this driver... why not? Because there is other code those experts want to write, and they don't have time to write it all... but what if they could just give a fairly straightforward prompt and have the LLM…

> Because there is other code those experts want to write, and they don't have time to write it all... but what if they could just give a fairly straightforward prompt and have the LLM do it for them? Then pretty soon they wouldn't be the experts anymore?

Maybe? But you could make the same argument that programmers today aren't "experts" at computers because they don't know how to build CPUs.

There is no reason to believe you can't gain expertise while still using higher and higher level abstractions. Yes, you will lose some of that low level expertise, but you can still be an expert at the problem set itself.

Post reply on HN