How to specify the –dist_dir when building Android kernel

I copied the build command from the following doc:

https://source.android.com/docs/setup/build/building-kernels

Here is the build command:

tools/bazel build //common:kernel_aarch64_dist -- --dist_dir=out/dist

Here is the error:

ERROR: Skipping '-dist_dir=out/dist': couldn't determine target from filename '-dist_dir=out/dist'
ERROR: couldn't determine target from filename '-dist_dir=out/dist'
INFO: Elapsed time: 0.158s
INFO: 0 processes.
ERROR: Build did NOT complete successfully

I have tried to create the "out/dist" first, and also tried to replace it with "/tmp/dist", but the error is the same "couldn't determine target from filename".

How to specify the --dist_dir when building Android kernel?

>Solution :

You need run to create a distribution, for example

tools/bazel run //common:kernel_aarch64_dist -- --dist_dir=out/dist

Leave a Reply