Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Side note. Are there any good resources for learning this?

I have done driver code in the past, a virtual block device that inteterfaced with the block layer.

But I want to go deeper. And understand how the code meets the metal.



Linux kernel source is a good start. Read up on just about everything in thr kernel docs on I2C, SPI, and regsets. Read datasheets, play around with dev boards.

There's no manul for it, really -- its close to old school software engineering on old machines. You have to learn the raw memory layouts, interfaces and some level of electronics theory, and wrestle with datasheets in the start.

Once you've figured out how a peripheral does its work, then you start looking at kernel drivers. For Android, drivers are a split thing: you have to write the kernel driver, then write a user space component called the HAL backend. There's a bit more documentation on that in thr AOSP tree, but not a whole lot.

Basically, you have to learn by doing. Find a chip you want to use in Android, and give it a try on a PandaBoard or some other SBC that can run it.


Thanks for taking the time to reply. Its good to know that there is no quick path to this and simply need to sit down and understand the code, and play around with real hardware.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: