Commit Graph

9 Commits

Author SHA1 Message Date
John Moon
1312198e53 ANDROID: build: Replace genrules with write_file where possible
Currently, there are a few places where we use Bazel's native genrule
rule to generate files that consist of simple strings (usually with
cat << EOF or echo "str" >> "$@" semantics). It was recently pointed
out to us that the Skylib library (already available from Kleaf) has
a "write_file" rule which is better than our genrule method for
creating files from strings.

It's better because it has a simpler interface, does not rely on any
Starlark-external tools (i.e. bash), and does not require all of the
strings to be formatted in one operation which makes the rule
slightly more readable.

Replace file-creating genrules where it makes sense to do so. This
change has no impact on actual build logic as the output files are
logically identical.

Change-Id: I2cef369e299d42b2677ddea833c43d9c80eff32c
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
2023-08-01 09:41:05 -07:00
John Moon
c38cee9986 ANDROID: build: Fix output directory layout
With a recent change to the output directory handling from
build_with_bazel.py, some dist directory paths incorrectly used
hyphens instead of underscores.

Fix this issue by mirroring the logic in msm_common.bzl which handles
these paths properly.

Also, run buildifier to fix format of Bazel build files.

Change-Id: Ia82073f059c54f4a7f523c5bd91afdc755c70df1
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
2023-07-22 20:40:11 -07:00
Gokul krishna Krishnakumar
e765e6515c build: Change target name to pineapple-allyes
Change name of the target to pineapple-allyes from pineapple.allyes.

Change-Id: I84525dda8efe64b9a031dda9e261c0a563cd979e
Signed-off-by: Gokul krishna Krishnakumar <quic_gokukris@quicinc.com>
2023-03-22 07:28:24 -07:00
qctecmdr
27000b0647 Merge "ANDROID: build: Set module signing keys in VM config" 2023-03-09 02:34:34 -08:00
John Moon
315568a798 ANDROID: build: Set module signing keys in VM config
Currently, modules are not signed by the VM config.

In legacy build.sh, the signing keys/certs would be generated in the
POST_DEFCONFIG phase of the build, but now, the keys are generated
by Bazel in a separate rule.

Take the key generation step out and use the new Bazel attributes
instead.

Change-Id: Ibbe3e98eab9d6d6a8dafc05582b3f17f83a226db
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
2023-03-02 09:42:17 -08:00
Gokul krishna Krishnakumar
cf5b0c1b72 build: Change le out directory to /out/target-variant
Changing dist directory from target.le-variant to target-variant.
This change is to keep out folder structure the same.

Change-Id: I8463065a0f2e683b2df3c311dc0a62ce19105bbf
Signed-off-by: Gokul krishna Krishnakumar <quic_gokukris@quicinc.com>
2023-02-21 15:00:03 -08:00
John Moon
944f85cffc ANDROID: build: Add signing/verity keys to output
Signing keys and certificates are required to sign kernel modules
and dm-verity hash, but these files are not generated in the current
build.

Add a Bazel rule to generate them and add to the output of the VM
distributions. Also add the scripts and pre-generated key required
to use them.

Change-Id: I1909548911b3d5742c75b3128f6b17b18ef789b4
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
2023-02-03 05:26:06 -08:00
John Moon
515dc189be build: Unify output directory format
Currently, the Bazel build output directory format differs from
legacy build.sh in that it replaces underscores directory name to
hyphens.

This behavior is undesirable, so refactor the output directory name
logic to be consistent with legacy build.sh:

out/msm-kernel-<target>-<variant> where words in the target and
variant are underscore-delimited.

Change-Id: Ia60076dd613fc034888703f10d5dc836b34c317b
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
2023-01-18 17:14:58 -08:00
John Moon
8503690aa2 build: Add support for Bazel VM builds
Currently, only legacy build.sh support exists for VM
builds.

Add Bazel support for these builds.

Change-Id: I10b221aa4a6633240b984eff333e15f5cd8b82cd
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
2022-11-14 15:05:22 -08:00