2025년 3월 27일부터 AOSP를 빌드하고 기여하려면 aosp-main
대신 android-latest-release
를 사용하는 것이 좋습니다. 자세한 내용은 AOSP 변경사항을 참고하세요.
GKI (Generic Kernel Image) 프로젝트
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
이 페이지에서는 일반 커널 이미지 (GKI) 프로젝트와 GKI가 Android 안정성을 높이고 보안을 개선하는 방법을 설명합니다.
기록
모든 Android 지원 기기에는 프로덕션 커널이 필요합니다. GKI 이전에는 커널이 맞춤설정되었으며 Android 일반 커널 (ACK)을 기반으로 했으며 단일 칩 시스템 (SoC) 공급업체와 OEM에서 기기별 변경사항을 적용했습니다.
이 맞춤설정으로 인해 커널 코드의 최대 50% 가 업스트림 Linux 커널 또는 ACK에서 오지 않은 트리 외부 코드가 될 수 있습니다.
따라서 GKI 이전 커널의 맞춤 특성으로 인해 상당한 커널 조각화가 발생했습니다.
조각화 비용
커널 조각화는 Android 커뮤니티에 몇 가지 부정적인 영향을 줍니다.
보안 업데이트에 많은 작업이 필요함
Android 보안 게시판(ASB)에 인용된 보안 패치는 각 기기 커널로 백포팅되어야 합니다. 그러나 커널 조각화로 인해 보안 수정사항을 현장의 Android 기기에 전파하는 데 엄청난 비용이 듭니다.
LTS(Long Term Supported) 업데이트를 병합하기가 어려움
LTS (Long Term Supported) 버전에는 보안 수정사항 및 기타 중요한 버그 수정이 포함됩니다. LTS 버전을 최신 상태로 유지하는 것이 보안 수정사항을 제공하는 가장 효과적인 방법임이 입증되었습니다. Pixel 기기에서는 ASB에 보고된 커널 보안 문제의 90%가 최신 상태로 유지되는 기기에서 이미 수정된 것으로 확인되었습니다.
그러나 기기 커널의 모든 맞춤 수정으로 인해 LTS 수정사항을 기기 커널에 병합하는 것이 어렵습니다.
조각화로 인해 커널 변경이 필요한 새로운 Android 기능을 현장의 기기에 추가하기 어려워질 수 있습니다. Android 프레임워크 코드는 다양한 커널 변형을 고려해야 했으며 커널에 구현된 새로운 Android 기능을 사용할 수 없었습니다. 이로 인해 혁신이 느려지고 코드 크기와 복잡성이 증가했습니다.
커널 변경사항을 업스트림 Linux에 다시 제공하기 어려움
프로덕션 커널로 패치를 가져오는 단편적인 방식으로 인해 LTS 버전이 업스트림에서 제공된 시점부터 기기에 적용될 때까지 최대 18개월의 지연이 발생했습니다.
업스트림 커널 출시와 제품 간의 이러한 긴 지연으로 인해 Android 커뮤니티가 필요한 기능 및 드라이버를 업스트림 커널에 공급하기 어렵습니다. 사용자가 개선 제안을 제출할 때 코드베이스가 변경되어 패치의 관련성을 보여주기 어려웠습니다.
조각화 문제 해결: GKI(일반 커널 이미지)
GKI(Generic Kernel Image) 프로젝트는 코어 커널을 통합하고 SoC 및 보드 지원을 코어 커널에서 공급업체 로더블 모듈로 이동하여 커널 조각화를 해결합니다. GKI는 공급업체 모듈을 위한 안정적인 커널 모듈 인터페이스(KMI)를 제공하므로 모듈과 커널을 독립적으로 업데이트할 수 있습니다. GKI 커널의 특징은 다음과 같습니다.
- GKI 커널은 ACK 소스에서 빌드됩니다.
- GKI 커널은 단일 커널 바이너리와 LTS 출시별 아키텍처당 관련 로더블 모듈입니다.
- GKI 커널은 관련 ACK에 대해 지원되는 모든 Android 플랫폼 출시에서 테스트됩니다. GKI 커널 버전의 전체 기간 동안 기능 지원 중단이 없습니다.
- GKI 커널은 지정된 LTS 내에 드라이버에 안정적인 KMI를 노출합니다.
- GKI 커널은 SoC 또는 보드 관련 코드를 포함하지 않습니다.
GKI 아키텍처 이미지는 커널 개요를 참고하세요.
일반 이미지
Android 12부터 커널 버전 5.10 이상으로 제공되는 기기는 GKI 커널과 함께 제공되어야 합니다. 일반 커널 이미지 (GKI) 출시 빌드는 정기적으로 업데이트되며 LTS 및 중요한 버그 수정을 통해 정기적으로 업데이트됩니다.
KMI의 바이너리 안정성이 유지되므로, 공급업체 이미지를 변경하지 않고도 이러한 부팅 이미지를 설치할 수 있습니다. GKI 프로젝트의 목표는 다음과 같습니다.
- 제품 커널을 GKI 커널로 대체할 때 심각한 성능 또는 전원 회귀를 발생시키지 않습니다.
- 파트너가 공급업체 개입 없이도 커널 보안 수정사항 및 버그 수정을 제공할 수 있도록 합니다.
- 기기의 주요 커널 버전을 업그레이드하는 데 드는 비용을 줄입니다.
- 명확한 업그레이드 프로세스로 커널 버전을 업데이트하여 아키텍처당 하나의 GKI 커널 바이너리만 유지합니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 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,["# Generic Kernel Image (GKI) project\n\nThis page describes the Generic Kernel Image (GKI) project\nand how it increases Android stability and improves security.\n\nHistory\n-------\n\nEvery Android-powered device needs a production kernel. Prior to GKI, kernels\nwere custom and based on the Android Common Kernel (ACK), with device-specific\nchanges made by system on chip (SoC) vendors and OEMs.\n\nThis customization could result in as much as 50% of kernel\ncode being out-of-tree code and not from upstream Linux kernels or ACKs.\nAs such, the custom nature of pre-GKI kernels resulted in\nsignificant kernel fragmentation.\n\nCosts of fragmentation\n----------------------\n\nKernel fragmentation has several negative effects on the Android community.\n\n### Security updates are labor intensive\n\nSecurity patches cited in the\n[Android Security Bulletin (ASB)](/docs/security/bulletin)\nmust be backported into each of the device kernels. However, due to kernel\nfragmentation, it's prohibitively expensive to propagate security fixes to\nAndroid devices in the field.\n\n### Difficult to merge Long-Term Supported updates\n\nThe *Long-Term Supported (LTS)* releases include security fixes and\nother critical bug fixes. Staying up to date with LTS releases has proven\nto be the\nmost effective way to provide security fixes. On Pixel devices, it was\ndiscovered that 90% of the kernel security issues reported in the ASB had\nalready been fixed for devices that stay up to date.\n\nHowever, with all of the custom modifications in the device kernels, it's\ndifficult to just merge the LTS fixes into device kernels.\n\n### Inhibit Android platform release upgrades\n\nFragmentation makes it difficult for new Android features requiring\nkernel changes to be added to devices in the field. Android Framework\ncode had to account for the different kernel variations and couldn't\nrely on new Android features being implemented in the kernel\nThis slowed down innovation and caused increased code size and\ncomplexity.\n\n### Difficult to contribute kernel changes back to upstream Linux\n\nThe fragmented way of pulling patches into the production kernels caused a\ndelay of up to 18 months from the point where an LTS release was available\nupstream, to when it was in a device.\nThis long delay between upstream kernel release and products makes it difficult\nfor the Android community to feed needed features and drivers into the\nupstream kernels. By the time a user submitted suggestions for improvements, the\ncodebase had changed, making it hard to show the relevance\nof the patch.\n\nFix the fragmentation: Generic Kernel Image\n-------------------------------------------\n\nThe **Generic Kernel Image (GKI) project** addresses kernel fragmentation by\nunifying the core kernel and moving SoC and board support out of the core kernel\ninto loadable vendor modules. GKI also presents a stable Kernel Module\nInterface (KMI) for vendor modules, so modules and kernel can be updated\nindependently. Some characteristics of the GKI kernel are:\n\n- The GKI kernel is built from the ACK sources.\n- The GKI kernel is a single-kernel binary plus associated loadable modules per architecture, per LTS release.\n- The GKI kernel is tested with all Android Platform releases that are supported for the associated ACK. There's no feature deprecation for the lifetime of a GKI kernel version.\n- The GKI kernel exposes a stable KMI to drivers within a given LTS.\n- The GKI kernel doesn't contain SoC-specific or board-specific code.\n\nFor an image of GKI architecture, refer to the\n[Kernel overview](/docs/core/architecture/kernel).\n\n### Common Image\n\nBeginning with Android 12, devices shipping with kernel version 5.10 or higher\nmust ship with the GKI kernel. [Generic Kernel Image (GKI) release\nbuilds](/docs/core/architecture/kernel/gki-release-builds) are updated regularly\nand updated regularly with LTS and critical bug fixes.\nBecause binary stability is maintained for the KMI, you can install these boot\nimages without making changes to vendor images. The GKI project has these goals:\n\n- Don't introduce significant performance or power regressions when replacing the product kernel with the GKI kernel.\n- Enable partners to deliver kernel security fixes and bug fixes without vendor involvement.\n- Reduce the cost of upreving the major kernel version for devices.\n- Maintain a single GKI kernel binary per architecture by updating kernel versions with a clear process for upgrading."]]