androidarmembeddedembedded-linuxlinux-from-scratch

Obtaining device drivers from ROMs


I would like to clean install embedded linux in ARM based smartphone. Inorder to do so i would need the device drivers such as flash memory, display etc. I was wondering if its is possible to extract the device drivers from the ROM'S supplied by these phone vendors?


Solution

  • No, this is not generally possible. One difficulty is due to linking. The drivers will call functions and infrastructure with-in Linux. For instance, even if kmalloc() is the same source, the location in address space maybe different. To extract the code, you would need to map the extracted Linux addresses to your target addresses. Also, it is common for drivers to inline features that might be called in another module like kfifo, etc which may have functional changes between the Linux versions. Even more common is that kfifo code will be inlined in the driver. If spinlock functionality changes between ARM Linux versions, you need to extract and replace this information from the driver with the new version. Finally, there are Linux features which aren't just deprecated, but completely removed and replaced by some other infrastructure.

    You question is very similar to . From some of the above reasons and possibly more, you can see that it is very difficult or impossible to implement this. That is why people made the Linux kernel GPL. You should be able to ask for the source code and modify it in a much more efficient (and functionally correct) way.