From 785326f47ad2ae5e55d62d50ec2cb449a9780b9b Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Thu, 13 Apr 2023 09:57:46 -0400 Subject: [PATCH] add emulator kernel build instructions Initially only covers building the 5.15 kernel for x86_64. Can be extended to covering 5.10 and arm64 too. --- static/build.html | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/static/build.html b/static/build.html index 4731b4e1..58bdb82a 100644 --- a/static/build.html +++ b/static/build.html @@ -97,6 +97,7 @@
  • Kernel +
    +

    Emulator

    + +
    mkdir -p android/kernel/5.15
    +cd android/kernel/5.15
    +repo init -u https://github.com/GrapheneOS/kernel_manifest-5.15.git -b 13
    +repo sync -j8
    + +

    To build the 5.15 kernel image and modules for the emulator:

    + +
    BUILD_CONFIG=common/build.config.gki.x86_64 build/build.sh
    +BUILD_CONFIG=common-modules/virtual-device/build.config.virtual_device.x86_64 build/build.sh
    + +

    Replace the prebuilts in the OS source tree:

    + +
    ANDROID_BUILD_TOP=~/android/grapheneos-13
    +cp out/android13-5.15/dist/bzImage $ANDROID_BUILD_TOP/kernel/prebuilts/5.15/x86_64/kernel-5.15
    +cp out/android13-5.15/dist/System.map $ANDROID_BUILD_TOP/kernel/prebuilts/5.15/x86_64/System.map
    +cp out/android13-5.15/dist/*.ko $ANDROID_BUILD_TOP/kernel/prebuilts/common-modules/virtual-device/5.15/x86-64/
    +
    +

    4th generation Pixels