Live data from Hacker News

Writing a basic Linux device driver when you know nothing about Linux drivers

crescentro.se

21–30 of 72 posts

Re: Writing a basic Linux device driver when you know nothing about Linux drivers

#21
This is awesome!

But it also makes me a little bit sad. The original parallel port and even ISA interface seemed so simple by comparison, with less layers of abstraction. Just run a wire, and write to a port.

I remember when I was a kid, I found a breakout board in an electronics store's random clearance parts bin, with an ISA header on an edge. On a whim I took it home and wire-wrapped a 7-segment LED onto it. Power and ground were easy. Each segment was hooked to a data line, through a simple buffer IC. I cheated and used only a minimal number of address lines to feed the enable port (guessing through a simple AND gate or something). I was amazed when I wrote to that address and it worked the first time!

I look at a protocol like USB, with hundreds of pages, and instead of that curious excitement and enablement I felt back then, I feel a bit overwhelmed.

Re: Writing a basic Linux device driver when you know nothing about Linux drivers

#22

This is awesome! But it also makes me a little bit sad. The original parallel port and even ISA interface seemed so simple by comparison, with less layers of abstraction. Just run a wire, and write to a port. I remember when I was a kid, I found a breakout board in an electronics store's random clearance parts bin, with an ISA header on an edge. On a whim I took it home and wire-wrapped a 7-segment LED onto it. Power…

I sometimes think about this, starting from scratch with a computer hardware and software stack that disallowed all of the layers of abstraction that have built up over the decades.

Yeah many of the abstractions help with performance but maybe there's value giving up much of that performance in exchange for simplicity.

Re: Writing a basic Linux device driver when you know nothing about Linux drivers

#25

This is awesome! But it also makes me a little bit sad. The original parallel port and even ISA interface seemed so simple by comparison, with less layers of abstraction. Just run a wire, and write to a port. I remember when I was a kid, I found a breakout board in an electronics store's random clearance parts bin, with an ISA header on an edge. On a whim I took it home and wire-wrapped a 7-segment LED onto it. Power…

I sometimes think about this, starting from scratch with a computer hardware and software stack that disallowed all of the layers of abstraction that have built up over the decades. Yeah many of the abstractions help with performance but maybe there's value giving up much of that performance in exchange for simplicity.

It would be neat to design a whole new contemporary stack from scratch.

Re: Writing a basic Linux device driver when you know nothing about Linux drivers

#26

> I also thought I’d message the vendor and ask them if they could share any specifications or docs regarding their protocol. To my surprise, Nanoleaf tech support responded to me within 4 hours, with a full description of the protocol that’s used both by the Desk Dock as well as their RGB strips. How cool is that? Too many vendors still think that they have valuable intellectual property in such relative trivialitie…

Yeah that part of the article put a big smile on my face. I did the same thing back in college, when I was in a lab. We wanted to do some research on Wi-Fi signals, and I happened to own a bunch of Wi-Fi adaptors produced by SomeSmallTech Co. Ltd., which featured relatively new Atheros chips and didn't have Linux drivers at the time. So I sent an email to the company's public email address, asking for some datasheets…

> don't have a company policy to collaborate with academic research"

Strangely they all have a tacit policy to build their products at least partly on the results of academic research.

Re: Writing a basic Linux device driver when you know nothing about Linux drivers

#27

> I also thought I’d message the vendor and ask them if they could share any specifications or docs regarding their protocol. To my surprise, Nanoleaf tech support responded to me within 4 hours, with a full description of the protocol that’s used both by the Desk Dock as well as their RGB strips. How cool is that? Too many vendors still think that they have valuable intellectual property in such relative trivialitie…

I have a solar inveter from a company, aparticular German brand. I wanted to use home assistant with it so I needed rs232 data.. tried the support and they asked me to sign an NDA. Okay, cool. I did with a fake name, address and everything and they sent a file.. Turns out the file is available online. Facepalm pro Max. So my question is, what kind of "IP" is in a data sheet that needs protection ? And this isnt even…

They have asked to the legal team who basically don't know shit about what us do and who will always take the most conservative approach possible. So you'll get either: no answer, a "NO" answer or an "NDA" answer.

Re: Writing a basic Linux device driver when you know nothing about Linux drivers

#28
There are many innovative OSes that are killed by the lack of Device Drivers.

As a community we must find a way for tackling this issue.

Micro-Kernels are a solution where one can run different OSes but they will reuse the same device driver servers.

But it requires co-ordination and determination.

Rust can be a solution for sure.

Re: Writing a basic Linux device driver when you know nothing about Linux drivers

#29

I want to run FreeBSD on my laptop, but they don't have a [complete] driver for my wifi card. I've thought about diving into AI coding-assistant agents just to see if I could use one to finish throwing together a working driver... but figuring out the AI agents is frictiony enough that I'm leaving it be. (I'm not a VSCode user)

AI can also be used to help reverse engineer blobs.

Re: Writing a basic Linux device driver when you know nothing about Linux drivers

#30

This is awesome! But it also makes me a little bit sad. The original parallel port and even ISA interface seemed so simple by comparison, with less layers of abstraction. Just run a wire, and write to a port. I remember when I was a kid, I found a breakout board in an electronics store's random clearance parts bin, with an ISA header on an edge. On a whim I took it home and wire-wrapped a 7-segment LED onto it. Power…

[deleted]
Post reply on HN