简体   繁体   中英

Modify and boot linux kernel on mobile device

During my education I have been developing Android iOS apps and websites for almost 18 months. Now, as my final year project, I am working on Linux source code with the goal to boot it on a mobile device – like Android. I have it successfully as a Debian package following tutorials on the Internet. I am currently using Ubuntu.

I have a strategy but not sure if I am on the right track. It is as follows:

A:

  1. Download Linux source code. Remove extra drivers, compile and install it on currently running Ubuntu and use it.

  2. Customize the code further and boot it as my own distribution. For that I'm following LFS .

  3. Specify a particular target mobile, modify the code for it, write drivers if I need any, not sure which one (that's why I'm here :) ), and boot the kernel on it.

I do not know whether my strategy is right or not. I'll really appreciate if someone can tell me:

B:

  1. Am I on the right track? If not, what might be the right one?

  2. Do I need to specify a mobile and customize the kernel code for that one?

  3. Other than drivers, what else do I need to change in the kernel?

  4. Last but not the least when I boot the kernel on a mobile device; am I going to have any interface or terminal there?

Sorry if my question doesn't make sense. I am a student and still trying to figure things out. I would be very thankful if someone could give me hints on what subjects to search for on the Internet.

Update: What I want is to confirm whether my strategy is correct or not. If not, then please just name the steps I should follow.

It is not unusual that the drivers for the SoC and devices around it are closed source. As far as I know, the drivers for the Exynos SoC (the stuff Samsung uses in many of their devices) is (partly) closed source .

So generally speaking you have to write drivers for everything and everyone. Especially the actual radio connection is tricky as there are no devices which need proprietary firmware blobs (although the rest of the drivers may be open source).

Another problem is the boot loader on many devices, which does not easily let you install custom kernels (hash sum stored in the boot loader, unwilling to boot if kernel hash does not match).

So, assuming you are developing for a device that is already supported by android, I personally would start with the corresponding device tree for your device and start modifying that. You can a lot of device trees on CyanogenMod's github page .

Benefits:

  • You can start off with a working state
  • If something breaks you know it was you

Alternatively, you can peek at other projects like Ubuntu Touch . They are able to utilize existing android kernels by using Hybris . If you want to have a distribution based on Debian/Ubuntu I would recommend trying Ubuntu Touch and modifying that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM