Solved Can I de-compile a kernel module?

Thanks. So it would be easier to write a driver than reverse it.
As long as you have the proper documentation on the device yes. If it's something say a USB device, there are likely a lot of standard USB things you can do without documentation, but specific operations, having proper documentation is key.
 
No, you need to RE (reverse-engineer) it. But that doesn't mean you can't use objdump as Crivens mentioned. Even better, you have tools such as IDA (unfortunately not entirely free). NSA released ghidra. Both (IDA, ghidra) will generate C code.
 
Out of curiosity, what's the device?
 
This was more a hypothetical situation.
I would like to look at the source code.
Was wondering the possibilities of dis-assembly.
 
Why not start with aplgpio.c from openbsd? You can find any magic numbers related to this device in lpc_ich.c in linux sources.
 
Note that even if you disassemble / decompile it, you'll probably be bound by the original license.
Depends. Some countries have laws that allow this, you only need someone in that area to do it and publish it. You may be able to find register offsets, calls to locking code, magic constants, ... - enough to do a new driver. But you need a good idea of the boiler plate code to match the structure against. Not for the weak of mind.

bakul good point. That is the way (maybe).
 
I lost all interest when it became obvious that source was not forthcoming.
 
there is a gemini lake gpio driver for freebsd on github that builds out of the box
openbsd has both apollo and gemini lake drivers
so it should be not very hard to hack an apollo one for freebsd (a lot easier than decompiling)
 
Back
Top