קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
ליבת Android מבוססת על ליבת Linux Long Term Supported (LTS). ב-Google, ליבות LTS משולבות עם תיקונים ספציפיים ל-Android כדי ליצור ליבות משותפות של Android (ACK).
ה-ACK נוצר ממאגר kernel/common. המאגר הזה הוא קבוצה רחבה יותר של ליבת Linux, עם תיקונים נוספים שספציפיים ל-Android.
ACKs בגרסה 5.10 ומעלה נקראים גם ליבות *generic kernel images (GKI). ליבות GKI תומכות בהפרדה בין קוד הליבה הגנרית שאינו תלוי בחומרה לבין מודולי GKI, לבין מודולי הספק שספציפיים לחומרה.
האינטראקציה בין ליבת ה-GKI לבין מודולים של ספקים מופעלת על ידי ממשק מודול הליבה (KMI), שמורכב מרשימות של סמלים שמזהים את הפונקציות והנתונים הגלובליים שנדרשים על ידי מודולים של ספקים. איור 1 מציג את ארכיטקטורת מודול הספק והליבה של GKI:
איור 1. ארכיטקטורה של מודול ספק וליבת GKI.
מילון מונחים בנושא ליבה
בהמשך מפורטים מונחים שמופיעים במשאבי העזרה בנושא ליבת המערכת.
סוגי ליבה
Android Common Kernel (ACK)
ליבת מערכת הפעלה שהיא downstream של ליבת LTS וכוללת תיקונים שחשובים לקהילת Android. התיקונים האלה לא מוזגו לליבת Linux או לליבות GKI לטווח ארוך.
אי אפשר להעביר תכונות של Android 12 לגרסאות קודמות של ליבות 4.19. קבוצת התכונות תהיה דומה לזו של מכשיר שהושק עם גרסה 4.19 ב-Android 11 ושודרג ל-Android 12.
ליבת Generic Kernel Image (GKI)
כל ליבת ACK מגרסה 5.10 ואילך(רק aarch64). ליבת ה-GKI מורכבת משני חלקים:
ליבת מערכת הפעלה גנרית – החלק בליבת ה-GKI שמשותף לכל המכשירים.
מודולי GKI – מודולי ליבה שנוצרו על ידי Google ואפשר לטעון אותם באופן דינמי במכשירים שבהם זה רלוונטי. המודולים האלה נוצרים כארטיפקטים של ליבת GKI ונמסרים לצד GKI כארכיון system_dlkm_staging_archive.tar.gz. מודולי GKI נחתמים על ידי Google באמצעות צמד המפתחות של זמן בניית הליבה, והם תואמים רק לליבת GKI שבה הם נבנו.
הענף שעבורו נוצרים ליבות GKI. שמות הסניפים תואמים לגרסאות הליבה, כמו android15-6.6.
Android-mainline
ההסתעפות הראשית של הפיתוח לתכונות של Android. כשמכריזים על ליבת LTS חדשה במעלה הזרם, יוצרים הסתעפות של ליבת GKI חדשה תואמת מ-android-mainline.
Linux mainline
: ענף הפיתוח הראשי של ליבות Linux במעלה הזרם, כולל ליבות LTS.
תנאים אחרים
תמונת אתחול מאומתת
הליבה מועברת בפורמט בינארי (boot.img) ומוצגת במכשיר.
התמונה הזו נחשבת מאושרת כי היא מכילה אישורים מוטמעים, ולכן Google יכולה לאמת שהמכשיר נשלח עם ליבת מערכת שאושרה על ידי Google.
מודול ליבה שניתן לטעינה באופן דינמי (DLKM)
מודול שאפשר לטעון באופן דינמי במהלך אתחול המכשיר, בהתאם לצרכים של המכשיר. GKI ומודולים של ספקים הם שני סוגים של DLKM. מודולי DLKM מופצים בפורמט .ko ויכולים להיות מנהלי התקנים או לספק פונקציונליות אחרת של ליבת מערכת ההפעלה.
פרויקט GKI
פרויקט Google שמטפל בפיצול של ליבת המערכת על ידי הפרדה של פונקציונליות ליבה משותפת מתמיכה ב-SoC וב-board ספציפיים לספק, למודולים שאפשר לטעון.
Generic Kernel Image (GKI): תמונת אתחול שאושרה על ידי Google ומכילה GKI kernel שנבנה מתוך עץ מקור של ACK ומתאים להעברה למחיצת האתחול של מכשיר מבוסס-Android.
ממשק מודול ליבת המערכת (KMI)
ממשק בין ליבת GKI לבין מודולים של ספקים, שמאפשר למודולים של ספקים להתעדכן באופן עצמאי בלי קשר לליבת GKI. הממשק הזה
מורכב מפונקציות ליבה ומנתונים גלובליים שזוהו כתלות בספק או ביצרן ציוד מקורי (OEM) באמצעות רשימות סמלים לכל שותף.
Vendor module
מודול ספציפי לחומרה שפותח על ידי שותף ומכיל SoC ופונקציונליות ספציפית למכשיר. מודול ספק הוא סוג של מודול ליבה שאפשר לטעון באופן דינמי.
השלבים הבאים
אם אתם חדשים בפיתוח ליבת Android, כדאי להתחיל בקריאת המאמרים הבאים:
אם אתם חדשים בפיתוח ליבת GKI, כדאי להתחיל בקריאת המאמר פיתוח GKI.
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-27 (שעון UTC).
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-07-27 (שעון UTC)."],[],[],null,["# Kernel overview\n\nThe Android kernel is based on an upstream\n[Linux Long Term Supported (LTS) kernel](https://www.kernel.org/category/lts). At Google, LTS kernels are combined\nwith Android-specific patches to form *Android Common Kernels (ACKs)*.\n\nACKs are built from the [kernel/common](https://android.googlesource.com/kernel/common) repository. This repository is a\nsuperset of the upstream Linux kernel, with additional Android-specific patches.\n\nACKs that are 5.10 and higher are also known as \\*generic kernel images (GKI)\nkernels. GKI kernels support the separation of the hardware-agnostic *generic\ncore kernel* code and [GKI modules](/docs/core/architecture/kernel/modules#gki-modules) from hardware-specific\n[vendor modules](/docs/core/architecture/kernel/modules#vendor-modules).\n\nThe interaction between the GKI kernel and vendor modules is enabled by the\n*Kernel Module Interface (KMI)* consisting of symbol lists identifying the\nfunctions and global data required by vendor modules. Figure 1 shows the GKI\nkernel and vendor module architecture:\n\n**Figure 1.** GKI kernel and vendor module architecture.\n| **Note:** The GKI kernel, GKI module, and vendor module architecture is the result of a multi-year effort known as the Generic Kernel Image (GKI) project. For information about this project and its phases, refer to [The Generic Kernel Image (GKI) project](/docs/core/architecture/kernel/generic-kernel-image).\n| **Note:** Kernels are referred to by their platform version followed by a kernel version. For example, `android15-6.6` is kernel for Android 15 with a version of `6.6`.\n\nKernel glossary\n---------------\n\nFollowing are terms used throughout the kernel documentation.\n\n### Kernel types\n\n*Android Common Kernel (ACK)*\n: A kernel that is downstream of a LTS kernel and includes patches that are\n important to the Android community. These patches haven't been merged into\n Linux mainline or Long Term GKI kernels.\n\nKernel with versions of 5.10 and higher are also referred to as\n[Generic Kernel Image (GKI)](#gkik) kernels.\n\n*Android Open Source Project (AOSP) kernel*\n: See [Android Common Kernel](#ack).\n\nAndroid 12 features can't be backported to 4.19 kernels; the feature set would\nbe similar to a device that launched with 4.19 on Android 11 and upgraded to\nAndroid 12.\n\n*Generic Kernel Image (GKI) kernel*\n\n: Any 5.10 and higher [ACK kernel](#ack)(aarch64 only). The GKI kernel has these\n two parts:\n\n - *Generic kernel* - The portion of the GKI kernel that is common across\n all devices.\n\n - *GKI modules* - Kernel modules built by Google that can be dynamically\n loaded on devices where applicable. These modules are built as artifacts\n of the GKI kernel and are delivered alongside GKI as the\n `system_dlkm_staging_archive.tar.gz` archive. GKI modules are signed by\n Google using the kernel build time key pair and are compatible only with the\n GKI kernel that they're built with.\n\n*Kernel Module Interface (KMI) kernel*\n\n: See [GKI kernel](#gkik).\n\n*Long Term Supported (LTS) kernel*\n\n: A Linux kernel that's supported for 2 to 6 years. [LTS kernels](https://www.kernel.org/category/lts) are\n released once per year and are the basis for each of Google's\n [Android Common Kernels](#ack).\n\n### Branch types\n\n*ACK KMI kernel branch*\n: The branch for which [GKI kernels](#gkik) are built. Branch names correspond\n to kernel versions, such as `android15-6.6`.\n\n*Android-mainline*\n: The primary development branch for Android features. When a new\n [LTS kernel](#lts) is declared upstream, the corresponding new\n [GKI kernel](#gkik)GKI kernel is branched from android-mainline.\n\n*Linux mainline*\n:The primary development branch for the upstream Linux kernels, including LTS\nkernels.\n\n### Other terms\n\n*Certified boot image*\n: The kernel delivered in binary form (`boot.img`) and flashed onto the device.\n This image is considered certified because contains embedded certificates so\n Google can verify that the device ships with a kernel certified by Google.\n\n*Dynamically loadable kernel module (DLKM)*\n: A module that can be dynamically loaded during device boot depending on the\n needs of the device. GKI and vendor modules are both types of DLKMs. DLKMs are\n released in `.ko` form and can be drivers or can deliver other kernel\n functionality.\n\n*GKI project*\n: A Google project addressing kernel fragmentation by separating common core\n kernel functionality from vendor-specific SoC and board support into loadable\n modules.\n\n*Generic Kernel Image (GKI)*\n:A boot image certified by Google that contains a [GKI kernel](#gkik) built from\nan [ACK](#ack) source tree and is suitable to be flashed to the boot partition\nof an Android-powered device.\n\n*Kernel Module Interface (KMI)*\n: An interface between the [GKI kernel](#gkik) and vendor modules allowing\n vendor modules to be updated independently of the GKI kernel. This interface\n consists of kernel functions and global data that have been identified as\n vendor/OEM dependencies using per-partner symbol lists.\n\n*Vendor module*\n: A hardware-specific module developed by a partner and that contains SoC and\n device-specific functionality. A vendor module is a type of dynamically loadable\n kernel module.\n\nWhat's next\n-----------\n\nIf you're new to Android kernel development, start by reading the\nfollowing:\n\n- [Long Term Stable Kernels](/docs/core/architecture/kernel/releases) - Background on upstream LTS kernels which feed into ACKs.\n- [Android Common Kernels](/docs/core/architecture/kernel/android-common) - Background on ACKs.\n\nIf you're new to GKI kernel development, start by reading\n[GKI development](/docs/core/architecture/kernel/gki-dev)."]]