Hi Matheus!
2017-02-11 22:26 GMT+03:00 Matheus Monteiro <
mathe...@gmail.com>:
> Hah, I wish I had the know-how to try and do this...
Frankly, the kernel is so big and diverse that it doesn't necessarily
require a huge deal of know-how to get started, and you can make you
learning curve as steep or as flat as you want it to be. It's also
quite fun IMO :)
> At least I'll start
> Computer Engineering this year, so I think I'm on the right track. Would you
> mind sharing what books/tutorials/concepts would you recommend for a
> beginner to get into reverse engineering/firmware/drivers/embedded linux?
There is a number of commonly recommended readings, such as "Linux
Driver Development" -
https://lwn.net/Kernel/LDD3/. I personally
believe though that learning by doing is the best: pick an area of
interest, look how other existing code in the kernel works, understand
what makes your case different, adapt accordingly. Then make a patch
out of it, submit to the mailing lists, get feedback, adjust. Rinse
and repeat :)
One of the easier ways to start (and pretty useful for all at the same
time) would be to try and make some of the WonderMedia's drivers work
with the mainline kernel. This would typically include fixing code
style issues, adding DeviceTree support and bindings, sometimes
linking to the proper clock and/or pinctrl code and such. Then it can
be submitted upstream for inclusion, at which point you will most
likely hear some great insights on areas you might have overlooked.
It's best to start somewhere where you have full access to the
hardware, understand what a "working" result would look like and also
have a datasheet. This latter part is the trickiest, but Greg from
WonderMedia has been very helpful in getting us additional datasheets
(albeit far from a complete set). We also have some datasheets for
older chipset versions (VT8500, WM8510 and such), which included some
pretty similar hardware blocks.
Long story short: as long as you have basic command of C and Git
you're already good to go. Feel free to drop by this list for
additional pointers!
Cheers,
Alexey
P.S. Off the top of my head, the devices that might be easiest to
start with are: serial flash (small, no external dependencies,
almost-working driver on github), NAND flash (relatively large, but no
external dependencies), CIR receiver (small, no external dependencies,
albeit rarely used other than in APC boards and Android TV boxes).
Built-in sound may require DMA controller support, which makes it a
bit trickier. HDMI would require a fresh start on the graphics
controller driver based on the DRM/KMS subsystem, which is a bit
large. Hardware video codec is large and undocumented, with only a
binary driver available - pretty hard. Hardware crypto accelerator is
small but undocumented, and only a binary driver available again. 3D
graphics acceleration - same as with any Mali 400 device.