update build guide examples

This commit is contained in:
Daniel Micay 2021-01-17 17:36:02 -05:00
parent 3a2ff1824a
commit ddf349f8e0

View File

@ -420,9 +420,9 @@ git submodule update --init --recursive
<pre>source script/envsetup.sh</pre> <pre>source script/envsetup.sh</pre>
<p>Select the desired build target (<code>aosp_crosshatch</code> is the Pixel 3 XL):</p> <p>Select the desired build target (<code>aosp_sunfish</code> is the Pixel 4a):</p>
<pre>choosecombo release aosp_crosshatch user</pre> <pre>choosecombo release aosp_sunfish user</pre>
<p>For a development build, you may want to replace <code>user</code> with <p>For a development build, you may want to replace <code>user</code> with
<code>userdebug</code> in order to have better debugging support. Production builds <code>userdebug</code> in order to have better debugging support. Production builds
@ -560,11 +560,11 @@ mv vendor/android-prepare-vendor/DEVICE/BUILD_ID/vendor/google_devices/* vendor/
<p>The encryption passphrase for all the keys generated for a device needs to <p>The encryption passphrase for all the keys generated for a device needs to
match for compatibility with the GrapheneOS scripts.</p> match for compatibility with the GrapheneOS scripts.</p>
<p>To generate keys for crosshatch (you should use unique keys per device <p>To generate keys for sunfish (you should use unique keys per device
variant):</p> variant):</p>
<pre>mkdir -p keys/crosshatch <pre>mkdir -p keys/sunfish
cd keys/crosshatch cd keys/sunfish
../../development/tools/make_key releasekey '/CN=GrapheneOS/' ../../development/tools/make_key releasekey '/CN=GrapheneOS/'
../../development/tools/make_key platform '/CN=GrapheneOS/' ../../development/tools/make_key platform '/CN=GrapheneOS/'
../../development/tools/make_key shared '/CN=GrapheneOS/' ../../development/tools/make_key shared '/CN=GrapheneOS/'
@ -579,7 +579,7 @@ cd ../..</pre>
<p>Generate a signify key for signing factory images:</p> <p>Generate a signify key for signing factory images:</p>
<pre>signify -G -n -p keys/crosshatch/factory.pub -s keys/crosshatch/factory.sec</pre> <pre>signify -G -n -p keys/sunfish/factory.pub -s keys/sunfish/factory.sec</pre>
<p>Remove the <code>-n</code> switch to set a passphrase. The <code>signify</code> <p>Remove the <code>-n</code> switch to set a passphrase. The <code>signify</code>
tool doesn't provide a way to change the passphrase without generating a new key, so tool doesn't provide a way to change the passphrase without generating a new key, so
@ -594,7 +594,7 @@ cd ../..</pre>
<p>You can (re-)encrypt your signing keys using the <code>encrypt_keys</code> script, <p>You can (re-)encrypt your signing keys using the <code>encrypt_keys</code> script,
which will prompt for the old passphrase (if any) and new passphrase:</p> which will prompt for the old passphrase (if any) and new passphrase:</p>
<pre>script/encrypt_keys.sh keys/crosshatch</pre> <pre>script/encrypt_keys.sh keys/sunfish</pre>
<p>The <code>script/decrypt_keys.sh</code> script can be used to remove encryption, <p>The <code>script/decrypt_keys.sh</code> script can be used to remove encryption,
which is not recommended. The script exists primarily for internal usage to decrypt which is not recommended. The script exists primarily for internal usage to decrypt
@ -636,10 +636,10 @@ cd ../..</pre>
<p>Generate a signed release build with the release.sh script:</p> <p>Generate a signed release build with the release.sh script:</p>
<pre>script/release.sh crosshatch</pre> <pre>script/release.sh sunfish</pre>
<p>The factory images and update package will be in <p>The factory images and update package will be in
<code>out/release-crosshatch-$BUILD_NUMBER</code>. The update zip performs a full OS <code>out/release-sunfish-$BUILD_NUMBER</code>. The update zip performs a full OS
installation so it can be used to update from any previous version. More efficient installation so it can be used to update from any previous version. More efficient
incremental updates are used for official over-the-air GrapheneOS updates and can be incremental updates are used for official over-the-air GrapheneOS updates and can be
generated by keeping around past signed <code>target_files</code> zips and generating generated by keeping around past signed <code>target_files</code> zips and generating
@ -682,28 +682,34 @@ cd ../..</pre>
delta updates by passing the device, source version build number and target version delta updates by passing the device, source version build number and target version
build number. For example:</p> build number. For example:</p>
<pre>script/generate_delta.sh crosshatch 2019.09.25.00 2019.10.07.21</pre> <pre>script/generate_delta.sh sunfish 2020.12.12.03 2021.01.05.03</pre>
<p>The script assumes that the releases are organized in the following directory <p>The script assumes that the releases are organized in the following directory
structure:</p> structure:</p>
<pre>releases <pre>releases
├── 2019.09.25.00 ├── 2020.12.12.03
│   └── release-crosshatch-2019.09.25.00 │   └── release-sunfish-2020.12.12.03
│      ├── crosshatch-factory-2019.09.25.00.zip │   ├── otatools
│      ├── crosshatch-factory-2019.09.25.00.zip.sig │   ├── sunfish-beta
│      ├── crosshatch-img-2019.09.25.00.zip │   ├── sunfish-factory-2020.12.12.03.zip
│      ├── crosshatch-ota_update-2019.09.25.00.zip │   ├── sunfish-factory-2020.12.12.03.zip.sig
│      ├── crosshatch-target_files-2019.09.25.00.zip │   ├── sunfish-img-2020.12.12.03.zip
│      └── crosshatch-testing │   ├── sunfish-ota_update-2020.12.12.03.zip
└── 2019.10.07.21 │   ├── sunfish-stable
└── release-crosshatch-2019.10.07.21 │   ├── sunfish-target_files-2020.12.12.03.zip
   ├── crosshatch-factory-2019.10.07.21.zip │   └── sunfish-testing
   ├── crosshatch-factory-2019.10.07.21.zip.sig └── 2021.01.05.03
   ├── crosshatch-img-2019.10.07.21.zip └── release-sunfish-2021.01.05.03
   ├── crosshatch-ota_update-2019.10.07.21.zip ├── otatools
   ├── crosshatch-target_files-2019.10.07.21.zip ├── sunfish-beta
   └── crosshatch-testing</pre> ├── sunfish-factory-2021.01.05.03.zip
├── sunfish-factory-2021.01.05.03.zip.sig
├── sunfish-img-2021.01.05.03.zip
├── sunfish-ota_update-2021.01.05.03.zip
├── sunfish-stable
├── sunfish-target_files-2021.01.05.03.zip
└── sunfish-testing</pre>
<p>Incremental updates are uploaded alongside the update packages and update metadata <p>Incremental updates are uploaded alongside the update packages and update metadata
on the static web server used as an update server. The update client will on the static web server used as an update server. The update client will