Update doc about rebuilding kernel for Microdroid

Bug: N/A
Test: N/A
Change-Id: I6db389f90ae191f24e56e21ebfa6cbfc3cbe1b04
diff --git a/docs/getting_started/index.md b/docs/getting_started/index.md
index f598034..be97ad5 100644
--- a/docs/getting_started/index.md
+++ b/docs/getting_started/index.md
@@ -83,7 +83,7 @@
   /data/local/tmp/virt/instance.img assets/vm_config.json
 ```
 
-## Building and updating CrosVM and VirtualizationService
+## Building and updating CrosVM and VirtualizationService {#building-and-updating}
 
 You can update CrosVM and the VirtualizationService by updating the `com.android.virt` APEX instead
 of rebuilding the entire image.
@@ -94,3 +94,28 @@
 adb install out/dist/com.android.virt.apex
 adb reboot
 ```
+
+## Building and updating GKI inside Microdroid
+
+Checkout the Android common kernel and build it following the [official
+guideline](https://source.android.com/setup/build/building-kernels).
+
+```shell
+mkdir android-kernel && cd android-kernel
+repo init -u https://android.googlesource.com/kernel/manifest -b common-android12-5.10
+repo sync
+FAST_BUILD=1 DIST_DIR=out/dist BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh -j80
+```
+
+Replace `build.config.gki.aarch64` with `build.config.gki.x86_64` if building
+for x86.
+
+Then copy the built kernel to the Android source tree.
+
+```
+cp out/dist/Image <android_root>/kernel/prebuilts/5.10/arm64/kernel-5.10
+```
+
+Finally rebuild the `com.android.virt` APEX and install it by following the
+steps shown in [Building and updating Crosvm and
+Virtualization](#building-and-updating).