Google Homepage
什么是GKI, 老规矩Android homepage转一下:
Fosslife
另外引自Generic Kernel Image Will Be Up and Running in Android 11 //链接上可以直接看出是从Android11开始Google疯狂的开始支持GKI.
Over the past few years, Google has been working to modularize Android and improve update speed. //一句话道破,为了模块化和加快系统迭代的速度.
As part of these efforts, for Android 11, the team is creating a more portable Linux kernel – or Generic Kernel Image (GKI) – to work across all Android devices, which would enable faster security deployments. //其中一部分的工作内容就是,从Android11开始,为Android一个移植性更高的Linux内核即通用内核镜像.(留几个问题, 通用内核镜像哪里下载?是否要在MR阶段更新?如何更新?). GKI能够运行在所有(理解为很多)Android设备上.这样带来的一个效果就是,快速的且安全的系统升级和部署. 举个例子, 市场上有很多类型的Android设备, 运行的Android OS版本有很大区别,有A9的,A10的,A11的等等 . 但是有了GKI之后,应该是都可以很快部署上A11, 假如Google想的话.
下面这段话很精彩:
According to Ars Technica, “Today, the Linux kernel gets forked three times before it hits a phone: the LTS release gets forked into the "Android Common" kernel by Google with Android OS-specific changes, then that gets forked into an SoC-specific kernel (usually by Qualcomm), then that gets forked by the device manufacturer into a device-specific kernel. The GKI would take the Android Common kernel – the first fork – and run it on a device.”
Linux kenel要经历三次fork(类似copy)才能真正的应用到一台手机上.
- LTS 支持的版本首先会被Google fork到Android common kernel, 其中包含了Google专门有针对性的改动
- LTS支持的版本还会被SoC厂商fork到SoC专门的目录, 例如Qualcomm/MTK...
- LTS支持的版本还会被设备制造厂fork到包含专门针对设备修改的kernel目录.
显然, GKI是common kernel,并且作为common的部分运行在设备上.
Release And Update
然而, GKI也有他的release规律,通常, 通过如下方法进行下载:
repo init -u https://android.googlesource.com/kernel/manifest
mv <kernel_manifest.xml> .repo/manifests
repo init -m manifest.xml
repo sync