Currently, our build uses the XML ABI definition exclusively for KMI
builds. Upstream recently switched to use STG. They also added new
lists for protected module tracking.
To stay in line with upstream, update our ABI definitions to use
these new build attributes. Remove the abi_gki_aarch64.xml file as
it is no longer used.
Change-Id: I6b4a8a7eacec16c37fd73aa42ff44a940e8d50e5
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
Currently, the system_dlkm image copied to our dist directory is
built from msm-kernel. Instead, we should use the version built from
ACK.
Disable building system_dlkm from msm-kernel and switch to copying
the ACK version to the dist dir.
Change-Id: I78f732b7963c88e77fadcd7dd8c8424038f0a199
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
Since, there are more options that are not common to
all targets, move them to image_opts as configurable
options.
Change-Id: I5664be920500ee6da1795812d18945d113567401
Signed-off-by: Abdul Salam <quic_asalam@quicinc.com>
This reverts commit 7d9197e99b.
Reverting to avoid removing debug information from modules.
Change-Id: I01be6f1b616ebde8578c40fc63f67a5d3170cf27
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
Currently, a kernel_compile_commands rule can be defined if the user
passes define_compile_commands = True to the definition macros. This
was to avoid enabling the interceptor on the kernel_build when it was
not necessary.
With a recent change upstream, the interceptor is no longer needed to
use compile_commands. Therefore, let's remove the argument and always
define the rule. That way, users can always generate the
compile_commands.json file if they wish.
Change-Id: I723756b31a2ec4582fee804386406194f5ce77d8
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
Currently, our build uses an in-house definition of a header-only
cc_library for use with userspace apps using UAPI headers.
Since we've upstreamed this feature, we should remove our internal
definition and use the one in Kleaf instead.
Change-Id: I22fd497a82a2b6148141b80c7f838d221c812a0e
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
Currently, we use the "abi_definition" attribute in Kleaf to define
our ABI definition file. Upstream recently modified this API to use
"abi_definition_xml" instead.
Update the attribute accordingly.
Change-Id: If8cd72fb584015f56e5fe63ddce48d96f0aafe91
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
Currently, DO_NOT_STRIP_MODULES is used to signal when and when not
to strip kernel modules. A recent upstream change removes this config
option by unsetting it during the Bazel build in Kleaf.
Instead of using the deprecated build.config method, use the
kernel_build attribute "strip_modules". Set to True in our builds.
Change-Id: I918758ce8758234bcc13a683c2b39fc639678229
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
The Kleaf ABI commands require collect_unstripped_modules to be set
to true in the kernel_build.
Since we need to use those commands, add the option when we're
defining other ABI targets.
Change-Id: I20f7d80c9b7938138d875a079c829997fa02913a
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
Currently, the initramfs image output is only enabled if vendor
ramdisk binaries are provided. However, Kleaf bundles the creation
of the "modules.load" file alongside the initramfs build. So, in
cases where vendor ramdisk binaries are not provided, this file is
absent.
Since "modules.load" is always necessary, always enable initramfs
image outputs.
Change-Id: I75a37c7e323f67ba91ab5f2649d97f1d20a42a67
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
Currently, the bare target platform is passed into the vendor
ramdisk hook.
Some hooks may need the target and variant combo, so pass that
instead.
Change-Id: I09bb8011b23c47472a18d83bffba02f15368b2b6
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
Currently, the Bazel build does not have any hooks to supply a
ramdisk to the init_boot.img build.
Add the hook and feed the output to the kernel_images rule to
generate init_boot.img.
Change-Id: I2fbfda609fde6842aede3e9d16c02923a2368eb0
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
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>
Update the qcom symbol list using provided Kleaf rule:
bazel run //msm-kernel:pineapple_gki_abi_update
Change-Id: I050de4440d01dc4c92c8a1a7cec10bf74fe1ca60
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
Currently, the list of implicit module outputs for all kernel builds
is hard-coded.
Instead, use the common GKI module list provided by upstream.
Change-Id: I3400def7c1bd6b637620b13040cb19e195697d18
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
Currently, the Bazel build uses the kernel_build_abi and
kernel_build_abi_dist rules from Kleaf. Those APIs are now
deprecated.
Replace the deprecated APIs with the new APIs: kernel_build,
kernel_abi, and kernel_abi_dist.
Change-Id: I46d793ee2522bb71da0f80c60302b241d4097ce6
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
Currently, the vendor_dlkm image is including system_dlkm modules
when building with Bazel. With the legacy build system, system_dlkm
modules are filtered out.
Since we have a list of vendor_dlkm modules handy in our in-tree
module list, just use that to generate a list file and pass in to
kernel_images.
Change-Id: I95cfc6d6e90eb0d778d0c4dab2cb3e30189c532d
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
Currently, the Bazel build is creating an empty system_dlkm image
because the module list is not being passed.
Pass in the GKI module list like we do in build.sh.
Change-Id: I88c7cf0858d7607fa115f366f40663ca0ce6e315
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
The canonical location of msm_kernel_extensions.bzl is changing.
Update the load() calls to the new location.
Change-Id: I27df6131de155cd0592cad5d57202ca01c4affb5
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
There's currently no way for userspace programs building with
Bazel to ingest the kernel UAPI headers. Kleaf generates a tarball
of the headers, but a Bazel cc_binary rule cannot use that as an
input.
Define a native Bazel header-only cc_library which userspace
programs can use to build with the kernel's UAPI headers. For
example:
cc_binary(
name = "foo",
srcs = ["foo.c"],
deps = ["//msm-kernel:kalama_gki_uapi_header_library"],
)
Change-Id: Ib884d9123e4ffd0bead97e8cebb5a3456e73b2a6
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
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>