From 41a7027d92241f8e38eb485c2f42b52412f9e011 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Sat, 19 Feb 2022 09:24:40 -0500 Subject: [PATCH] move vendor file extraction before env setup --- static/build.html | 96 +++++++++++++++++++++++------------------------ 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/static/build.html b/static/build.html index 44f9e399..711d5d8e 100644 --- a/static/build.html +++ b/static/build.html @@ -70,8 +70,6 @@
  • Updating and switching branches or tags
  • Kernel
  • -
  • Setting up the OS build environment
  • -
  • Reproducible builds
  • Extracting vendor files for Pixel devices
  • +
  • Setting up the OS build environment
  • +
  • Reproducible builds
  • Building
  • Faster builds for development use only
  • @@ -468,6 +468,52 @@ repo sync -j16 build at out/mixed/dist in the kernel-raviole source tree.

    +
    +

    Extracting vendor files for Pixel devices

    + +

    This section is specific to Pixel devices. The emulator and generic targets don't + require extra vendor files.

    + +

    Many of these components are already open source, but not everything is set up to + be built by the Android Open Source Project build system. Switching to building these + components from source will be an incremental effort. In many cases, the vendor files + simply need to be ignored and AOSP will already provide them instead. Firmware cannot + generally be built from source even when sources are available, other than to verify + that the official builds match the sources, since it has signature verification (which + is an important part of the verified boot and attestation security model).

    + +
    +

    Pixel 5 and earlier

    + +

    Extract the vendor files corresponding to the matching release with + DEVICE and BUILD_ID replaced with the + appropriate values:

    + +
    vendor/android-prepare-vendor/execute-all.sh -d DEVICE -b BUILD_ID -o vendor/android-prepare-vendor
    +mkdir -p vendor/google_devices
    +rm -rf vendor/google_devices/DEVICE
    +mv vendor/android-prepare-vendor/DEVICE/BUILD_ID/vendor/google_devices/* vendor/google_devices/
    +
    + +
    +

    Pixel 6 and later

    + +

    Starting with the Pixel 6, newer generation devices use the adevtool project to + extract files from the stock operating system. +

    + +
    cd vendor/adevtool/ && yarn install && cd ../..
    +vendor/adevtool/mountimages.bash DEVICE BUILD_ID
    +sudo vendor/adevtool/bin/run generate-all vendor/adevtool/config/DEVICE.yml -c vendor/state/DEVICE.json -f vendor/adevtool/dl/DEVICE-BUILD_ID-*.zip -s vendor/adevtool/dl/DEVICE-BUILD_ID/mount/
    + +

    OTA firmware extraction is currently a work-in-progress on adevtool. + android-prepare-vendor is being temporarily used to make the process easier.

    + +
    vendor/android-prepare-vendor/execute-all.sh -d DEVICE -b BUILD_ID -o vendor/android-prepare-vendor
    +cp -r vendor/android-prepare-vendor/DEVICE/BUILD_ID/vendor/google_devices/DEVICE/radio/* vendor/google_devices/DEVICE/firmware/
    +
    +
    +

    Setting up the OS build environment

    @@ -522,52 +568,6 @@ repo sync -j16 update server.

    -
    -

    Extracting vendor files for Pixel devices

    - -

    This section is specific to Pixel devices. The emulator and generic targets don't - require extra vendor files.

    - -

    Many of these components are already open source, but not everything is set up to - be built by the Android Open Source Project build system. Switching to building these - components from source will be an incremental effort. In many cases, the vendor files - simply need to be ignored and AOSP will already provide them instead. Firmware cannot - generally be built from source even when sources are available, other than to verify - that the official builds match the sources, since it has signature verification (which - is an important part of the verified boot and attestation security model).

    - -
    -

    Pixel 5 and earlier

    - -

    Extract the vendor files corresponding to the matching release with - DEVICE and BUILD_ID replaced with the - appropriate values:

    - -
    vendor/android-prepare-vendor/execute-all.sh -d DEVICE -b BUILD_ID -o vendor/android-prepare-vendor
    -mkdir -p vendor/google_devices
    -rm -rf vendor/google_devices/DEVICE
    -mv vendor/android-prepare-vendor/DEVICE/BUILD_ID/vendor/google_devices/* vendor/google_devices/
    -
    - -
    -

    Pixel 6 and later

    - -

    Starting with the Pixel 6, newer generation devices use the adevtool project to - extract files from the stock operating system. -

    - -
    cd vendor/adevtool/ && yarn install && cd ../..
    -vendor/adevtool/mountimages.bash DEVICE BUILD_ID
    -sudo vendor/adevtool/bin/run generate-all vendor/adevtool/config/DEVICE.yml -c vendor/state/DEVICE.json -f vendor/adevtool/dl/DEVICE-BUILD_ID-*.zip -s vendor/adevtool/dl/DEVICE-BUILD_ID/mount/
    - -

    OTA firmware extraction is currently a work-in-progress on adevtool. - android-prepare-vendor is being temporarily used to make the process easier.

    - -
    vendor/android-prepare-vendor/execute-all.sh -d DEVICE -b BUILD_ID -o vendor/android-prepare-vendor
    -cp -r vendor/android-prepare-vendor/DEVICE/BUILD_ID/vendor/google_devices/DEVICE/radio/* vendor/google_devices/DEVICE/firmware/
    -
    -
    -

    Building