简体   繁体   English

编译Android时的内核和平台文件

[英]Kernel and platform files while compiling Android

I compiled the kernel files for my device however, I don't know what platform files are for. 我为我的设备编译了内核文件,但是我不知道平台文件的用途。 Could you please tell me what are the functions of "kernel" and "platform" files? 你能告诉我“内核”和“平台”文件的功能吗? Thanks in advance. 提前致谢。

Android OS consists of 4 main parts: Linux Kernel, Core Libraries, Application Framework and Applications. Android OS由4个主要部分组成:Linux内核,核心库,应用程序框架和应用程序。 So everything that is connected with Linux Kernel in Android is usually called kernel and all other layers (except maybe Applications) are platform. 因此,与Android中的Linux内核相关的所有内容通常称为内核,所有其他层(可能除了应用程序)都是平台。 When you're downloading AOSP (see instructions on source.android.com ) you download platform where the kernel is usually comes prebuilt. 当您下载AOSP(请参阅source.android.com上的说明 )时,您可以下载内核通常预先构建的平台。 But you can separately download kernel and modify it (what you've done). 但是你可以单独下载内核并修改它(你做了什么)。

Android Operating System can be roughly split into 2 parts- Android操作系统大致可分为两部分 -

  • The Linux Kernel Linux内核

  • The Android Framework. Android框架。

The Android Framework is on top of the linux kernel and it is that which is referred as platform . Android框架位于Linux内核之上,它被称为平台 Platform code consists of the Window manager, Event manager etc. It handles things like what should happen when the screen is touched, how windows are drawn and a host of other things. 平台代码由窗口管理器,事件管理器等组成。它处理触摸屏幕时应该发生的事情,窗口绘制的方式以及许多其他事情。 The linux kernel provides the scheduler ( heart of the OS ), drivers which interact with the H/W and a lot of other stuffs. linux内核提供调度程序(操作系统的核心),与H / W交互的驱动程序以及许多其他内容。

In short, the platform talks to the user with the aid of the underlying kernel. 简而言之,该平台借助底层内核与用户交谈。 Generally , in android, most of the platform code is in java and kernel code is predominantly in C. 通常 ,在android中,大多数平台代码都在java中,而内核代码主要在C中。

So until you have modified some platform java files you don't need to compile it. 因此,在修改某些平台java文件之前,您不需要编译它。 Your random.c and cipher.c should be part of the kernel and not the platform 你的random.ccipher.c应该是内核的一部分,而不是平台

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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