summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYifan Hong <elsk@google.com>2024-03-06 15:27:06 -0800
committerTreehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com>2024-03-07 09:33:33 +0000
commit501c8547778fe0f6e3cfe884d77c78938f0dd9db (patch)
treebfe85e0629dd770e72718cefc5be627756e022fc
parentda309c709e31c27084795c13072e0e95b1ef03d8 (diff)
downloadbuild-501c8547778fe0f6e3cfe884d77c78938f0dd9db.tar.gz
kleaf: Update docs (3/3)
Update docs for kernel_prebuilt_ext.declare_kernel_prebuilts. Test: TH Change-Id: Ie7d23da9955d4cf3d811a6da7de89875adeed5b0
-rw-r--r--kleaf/docs/api_reference/kernel_prebuilt_ext.md7
1 files changed, 2 insertions, 5 deletions
diff --git a/kleaf/docs/api_reference/kernel_prebuilt_ext.md b/kleaf/docs/api_reference/kernel_prebuilt_ext.md
index fe939ac..ea76976 100644
--- a/kleaf/docs/api_reference/kernel_prebuilt_ext.md
+++ b/kleaf/docs/api_reference/kernel_prebuilt_ext.md
@@ -8,9 +8,8 @@ Extension that helps building Android kernel and drivers.
<pre>
kernel_prebuilt_ext = use_extension("@kleaf//build/kernel/kleaf:kernel_prebuilt_ext.bzl", "kernel_prebuilt_ext")
-kernel_prebuilt_ext.declare_kernel_prebuilts(<a href="#kernel_prebuilt_ext.declare_kernel_prebuilts-name">name</a>, <a href="#kernel_prebuilt_ext.declare_kernel_prebuilts-artifact_url_fmt">artifact_url_fmt</a>, <a href="#kernel_prebuilt_ext.declare_kernel_prebuilts-auto_download_config">auto_download_config</a>,
- <a href="#kernel_prebuilt_ext.declare_kernel_prebuilts-build_number">build_number</a>, <a href="#kernel_prebuilt_ext.declare_kernel_prebuilts-download_config">download_config</a>, <a href="#kernel_prebuilt_ext.declare_kernel_prebuilts-local_artifact_path">local_artifact_path</a>,
- <a href="#kernel_prebuilt_ext.declare_kernel_prebuilts-mandatory">mandatory</a>, <a href="#kernel_prebuilt_ext.declare_kernel_prebuilts-target">target</a>)
+kernel_prebuilt_ext.declare_kernel_prebuilts(<a href="#kernel_prebuilt_ext.declare_kernel_prebuilts-name">name</a>, <a href="#kernel_prebuilt_ext.declare_kernel_prebuilts-auto_download_config">auto_download_config</a>, <a href="#kernel_prebuilt_ext.declare_kernel_prebuilts-download_config">download_config</a>,
+ <a href="#kernel_prebuilt_ext.declare_kernel_prebuilts-local_artifact_path">local_artifact_path</a>, <a href="#kernel_prebuilt_ext.declare_kernel_prebuilts-mandatory">mandatory</a>, <a href="#kernel_prebuilt_ext.declare_kernel_prebuilts-target">target</a>)
</pre>
Extension that manages what prebuilts Kleaf should use.
@@ -29,9 +28,7 @@ Declares a repo that contains kernel prebuilts
| Name | Description | Type | Mandatory | Default |
| :------------- | :------------- | :------------- | :------------- | :------------- |
| <a id="kernel_prebuilt_ext.declare_kernel_prebuilts-name"></a>name | name of repository | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
-| <a id="kernel_prebuilt_ext.declare_kernel_prebuilts-artifact_url_fmt"></a>artifact_url_fmt | API endpoint for Android CI artifacts.<br><br>The format may include anchors for the following properties: * {build_number} * {target} * {filename}<br><br>Its default value is the API endpoint for http://ci.android.com.<br><br>Regardless of whether you are downloading from a remote server with `http://` URLs or from local machine with `file://` URLs, `--config=internet` is needed. Hence, if you want to use local files, set `local_artifact_path`. | String | optional | `"https://androidbuildinternal.googleapis.com/android/internal/build/v3/builds/{build_number}/{target}/attempts/latest/artifacts/{filename}/url?redirect=true"` |
| <a id="kernel_prebuilt_ext.declare_kernel_prebuilts-auto_download_config"></a>auto_download_config | If `True`, infer `download_config` and `mandatory` from `target`. | Boolean | optional | `False` |
-| <a id="kernel_prebuilt_ext.declare_kernel_prebuilts-build_number"></a>build_number | build number to be used in `artifact_url_fmt`.<br><br>Unlike `kernel_prebuilt_repo`, the environment variable `KLEAF_DOWNLOAD_BUILD_NUMBER_MAP` is **NOT** respected. | String | optional | `""` |
| <a id="kernel_prebuilt_ext.declare_kernel_prebuilts-download_config"></a>download_config | Configure the list of files to download.<br><br>Key: local file name.<br><br>Value: remote file name format string, with the following anchors: * {build_number} * {target} | <a href="https://bazel.build/rules/lib/dict">Dictionary: String -> String</a> | optional | `{}` |
| <a id="kernel_prebuilt_ext.declare_kernel_prebuilts-local_artifact_path"></a>local_artifact_path | Directory to local artifacts.<br><br>If set, `artifact_url_fmt` is ignored.<br><br>Only the root module may call `declare()` with this attribute set.<br><br>If relative, it is interpreted against workspace root.<br><br>If absolute, this is similar to setting `artifact_url_fmt` to `file://<absolute local_artifact_path>/{filename}`, but avoids using `download()`. Files are symlinked not copied, and `--config=internet` is not necessary. | String | optional | `""` |
| <a id="kernel_prebuilt_ext.declare_kernel_prebuilts-mandatory"></a>mandatory | Configure whether files are mandatory.<br><br>Key: local file name.<br><br>Value: Whether the file is mandatory.<br><br>If a file name is not found in the dictionary, default value is `True`. If mandatory, failure to download the file results in a build failure. | <a href="https://bazel.build/rules/lib/dict">Dictionary: String -> String</a> | optional | `{}` |