Commit Graph

63 Commits

Author SHA1 Message Date
Ulises Mendez Martinez
24886bc4db ANDROID: rockpi4: Add ABI targets & symbol list
* This is the initial symbol list for
rockpi4 target.

Bug: 261782070
Change-Id: I76f8924f5e40c6ecfb91a5291b86a9d4fd9badb0
Signed-off-by: Ulises Mendez Martinez <umendez@google.com>
2023-01-24 20:19:05 +00:00
Yongqin Liu
4a881d76d4 ANDROID: db845c: enable abi build and update KMI list
update the KMI symbol list after enabled
the bazel abi build method by running commands like this:
    $ tools/bazel run //common:db845c_abi_dist
    $ tools/bazel run //common:db845c_abi_update_symbol_list

Bug: 246861677
Test: run the db845c_dist, db845c_abi_dist, db845c_abi_update_symbol_list
      and the build could boot to homescreen

Change-Id: Ibe628880c0556f20594b581bda6e7e0733b3f121
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
2022-12-02 18:55:48 +00:00
Ramji Jiyani
7d08da22b3 ANDROID: GKI: Add virtual_device arm64 symbollist
It was removed as part of http://aosp/2225442 being
out dated; but need to restore it until kleaf supports
to generate new one for the virtual_device. This
will allow virtual_device modules depending on GKI
modules symbols to load.

This will serve as baseline as of now.

Test: TH
Bug: 248334110
Change-Id: I6bbe8d4544b2f8759ed844a672dd9304e9c091cb
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
2022-12-01 16:48:57 +00:00
Yifan Hong
a0b8d8e191 ANDROID: Fix license for BUILD.bazel file.
It should be GPLv2.

Test: none
Bug: 259137060
Change-Id: I6381a9e5a543c24d395984c211bfde5993ea4840
Signed-off-by: Yifan Hong <elsk@google.com>
2022-11-30 10:11:57 +00:00
Yifan Hong
6d03fcb24d ANDROID: Fix DDK include dirs for arm.
It is a typo to put arch/arm64/include/*
in the include dirs.

Test: treehugger
Bug: 254735056
Change-Id: I151786b6c6ab3397a2eb829e3c86cc3303ff0ceb
Signed-off-by: Yifan Hong <elsk@google.com>
2022-11-29 14:08:54 +00:00
Yongqin Liu
32a7bc01f8 ANDROID: db845c: drop gki_modules_list to use all gki modules by default
with the db845c mac80211.ko and cfg80211.ko dropped,
and related kernel configs removed.
especially if CONFIG_NL80211_TESTMODE=y is not removed,
the following error will be reported:
    [    1.993280][    T1] init: Loading module /lib/modules/ath10k_core.ko with args ''
    [    2.004838][    T1] ath10k_core: disagrees about version of symbol ieee80211_alloc_hw_nm
    [    2.013029][    T1] ath10k_core: Unknown symbol ieee80211_alloc_hw_nm (err -22)
    [    2.070362][    T1] init: Failed to insmod '/lib/modules/ath10k_core.ko' with args '': Invalid t
    [    2.079933][    T1] init: LoadWithAliases was unable to load ath10k_core
    [    2.087752][    T1] init: Failed to load kernel modules

Fixes: b519faae30 ("ANDROID: ABI: gki_defconfig: disable cfg80211 and mac80211")
Test: boot the db845c_dist build to homescreen

Change-Id: I84b5a60a9bfed83c65fdae3a68e726779a6fb679
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
2022-11-28 23:16:14 +00:00
Ulises Mendez Martinez
3a954f97ee ANDROID: kleaf: Rename allmodconfig targets
* This is to follow the convention:
  kernel_<arch>_<target>

Bug: 260313194
Change-Id: I735356b130499b579b743b270164824c09c42497
Signed-off-by: Ulises Mendez Martinez <umendez@google.com>
2022-11-24 13:41:13 +00:00
Yifan Hong
3d7c9fdef1 ANDROID: Remove virtgpu_trace.h from DDK unsafe headers.
With the following change merged, the unsafe header
is no longer necessary.

3b72a6405c0f301ed787d899077748f84c8bcafc
("kleaf: enable DDK for virtual devices")

Bug: 254735056

Change-Id: I2e89f5c921d641a486d4c06628d59551f61ba2ba
Signed-off-by: Yifan Hong <elsk@google.com>
2022-11-23 01:23:48 +00:00
Yifan Hong
b5b9d443ba ANDROID: Add ddk_headers for arm architecture.
Similar to aarch64 and x86_64, we also add ddk_headers
for arm so we can build DDK (Driver development kit) modules
for the arm architecture for virtual devices.

Test: Treehugger
Bug: 254735056
Change-Id: I7ade4a6053e59d84b825285fbc6162b6e642682e
Signed-off-by: Yifan Hong <elsk@google.com>
2022-11-23 01:23:48 +00:00
Yifan Hong
023b893955 Revert "ANDROID: kleaf: convert rockpi4 to mixed build."
This reverts commit 6100c90ef5.

Reason for revert: rockpi4 has DEVTMPFS enabled and GKI doesn't

Bug: 258841346
Change-Id: Icefb1bb4cf39004234513d307e385b04cb76e51d
2022-11-22 23:44:09 +00:00
Yifan Hong
6100c90ef5 ANDROID: kleaf: convert rockpi4 to mixed build.
Build the GKI //common:kernel_aarch64, then
build rockpi4 modules on top of it.

As a side effect of this change, rockpi4 will no longer
be able to be built with build.sh because it won't produce
vmlinux, etc..

Test: TH
Test: bazel run //common:rockpi4_dist
Bug: 258841346
Change-Id: I88989a265d0a90daddc85dd45a8736f942350522
Signed-off-by: Yifan Hong <elsk@google.com>
2022-11-22 23:42:33 +00:00
Yongqin Liu
a8dd10b422 ANDROID: BUILD.bazel: db845c: integrate gki can.ko libarc4.ko rfkill.ko
as they are required by the db845c vendor modules.
Otherwise error like the following will be reported:
    [    1.850121][    T1] init: Loading module /lib/modules/cfg80211.ko with args ''
    [    1.865624][    T1] cfg80211: Unknown symbol rfkill_alloc (err -2)
    [    1.871916][    T1] cfg80211: Unknown symbol rfkill_register (err -2)
    [    1.878426][    T1] cfg80211: Unknown symbol rfkill_destroy (err -2)
    [    1.884845][    T1] cfg80211: Unknown symbol rfkill_resume_polling (err -2)
    [    1.891889][    T1] cfg80211: Unknown symbol rfkill_unregister (err -2)
    [    1.898621][    T1] cfg80211: Unknown symbol rfkill_set_hw_state_reason (err -2)
    [    1.906236][    T1] cfg80211: Unknown symbol rfkill_blocked (err -2)
    [    1.942752][    T1] init: Failed to insmod '/lib/modules/cfg80211.ko' with args '': No such file or directory
    [    1.952811][    T1] init: LoadWithAliases was unable to load /lib/modules/cfg80211.ko

Fixes: 6a0f9b1a5a ("ANDROID: GKI: Convert RF switch subsys as module")
Fixes: 6647fadd21 ("ANDROID: GKI: Convert CAN Bus Subsystem as module")
Fixes: 01d9b23ec3 ("ANDROID: GKI: Convert Net PPP Protocol as module")

Test: boot the db845c build to homescreen

Change-Id: Ia2a072a9d422922a0400495a2107ea0967493ba7
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
2022-11-22 03:27:11 +00:00
Yifan Hong
ce3c550c15 ANDROID: kleaf: Add build rules for allmodconfig.
These corresponds to the build.config.allmodconfig.*
build configs.

Unlike build.sh, the Kleaf variant deliberately does not copy
any outputs to the distribution directory. There's not
even a dist target.
This is because allmodconfig is a build test only.

Test: bazel build --allow_undeclared_mdoules //common:allmodconfig_{aarch64,arm,x86_64}
Bug: 258259749
Change-Id: Iefe8f69149f6391938696e90243939d42d4fda84
Signed-off-by: Yifan Hong <elsk@google.com>
2022-11-21 21:15:22 +00:00
Yifan Hong
880ad59ebb ANDROID: convert rockpi4 to kleaf.
Use Kleaf to build rockpi4.

This does not enable mixed build. Mixed build is enabled
in follow-up CLs.

Test: bazel build //common:rockpi4_dist
Bug: 258259749
Bug: 258841346
Change-Id: I4828953495c862afe517fff48195d2f6a97e3fcf
Signed-off-by: Yifan Hong <elsk@google.com>
2022-11-17 10:45:14 +00:00
Yifan Hong
718c482c2b ANDROID: kleaf: Move list of kernel modules to an extension.
This is so that it can be loaded by other packages. Some
device's may wish to not build mixed build, in which case
they'll either need to use 'auto' in module_outs (discouraged),
or load the list of GKI modules.

Test: TH
Bug: 258308697
Change-Id: Iff7778b9edae7101a2debd44a49bb5eb403bfb2f
Signed-off-by: Yifan Hong <elsk@google.com>
2022-11-15 16:13:08 -08:00
Ramji Jiyani
78a20156d1 ANDROID: GKI: Convert BT HCI sdio & uart as modules
Converts BT host controller sdio & uart interface drivers
as modules:

CONFIG_BT_HCIBTSDIO: HCI SDIO driver
CONFIG_BT_HCIUART: HCI UART driver

Converts HCI uart dependent protocol drivers as modules
due to dependency on the CONFIG_BT_HCIUART.

CONFIG_BT_HCIUART_QCA: Qualcomm Atheros protocol support
CONFIG_BT_HCIUART_BCM: Broadcom protocol support

Bug: 232431151
Test: TH
Change-Id: I3a3a7ae03140774a78a56ac306b8aef1042b1ceb
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
2022-11-15 21:51:01 +00:00
Ramji Jiyani
4747c631a4 ANDROID: GKI: Covnert Bluetooth HIDP as module
CONFIG_BT_HIDP: HIDP protocol support

HIDP (Human Interface Device Protocol) is a transport
layer for HID reports. HIDP is required for the Bluetooth
Human Interface Device Profile.

Bug: 232431151
Test: TH
Change-Id: Ibe9ed98370ecc9c9825c3a735070817d16254138
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
2022-11-15 19:33:44 +00:00
Ramji Jiyani
264b55ef9b ANDROID: GKI: Convert Bluetooth RFCOMM as module
CONFIG_BT_RFCOMM: RFCOMM protocol support

RFCOMM provides connection oriented stream transport.
RFCOMM support is required for Dialup Networking,
OBEX and other Bluetooth applications.

Bug: 232431151
Test: TH
Change-Id: I573d8c7a1eff02b1554b5d6793b5c3c06fb35931
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
2022-11-15 18:49:13 +00:00
Ramji Jiyani
595b8764fb ANDROID: GKI: Convert NFC support as GKI module
CONFIG_NFC: NFC subsystem support

Bug: 232431151
Test: TH
Change-Id: Idc4d8c6656a8c4e36a695d9c9eb18fe20793bc76
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
2022-11-15 18:08:35 +00:00
Ramji Jiyani
d100f8e9a1 ANDROID: GKI: Convert VLAN 8021Q as gki module
Sets following feature to module:
CONFIG_VLAN_8021Q: Create 8021Q vlan interfaces.

Bug: 232431151
Test: TH
Change-Id: I4728f03b04bb49f65838564c96f88d232cbf21e8
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
2022-11-15 01:21:38 +00:00
Ramji Jiyani
e516a098e2 ANDROID: GKI: Convert TIPC to gki modules
Converts following networking features to modules:

CONFIG_TIPC: The Transparent Inter Process Communication (TIPC) protocol.
CONFIG_TIPC_DIAG: TIPC: socket monitoring interface

Bug: 232431151
Test: TH
Change-Id: I370cc7a34f67222b619107d773cc4a13edd6b538
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
2022-11-14 22:38:45 +00:00
Ramji Jiyani
1383c8eae9 ANDROID: GKI: Add USB serial and ftdi sio modules
CONFIG_USB_SERIAL: USB Serial Converter support
CONFIG_USB_FTDI_SIO: FTDI SIO single port USB to
serial converter device.

Bug: 232431151
Test: TH
Change-Id: I1522a9beb0f70740fdce11d1c50b606d81ddf6c6
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
2022-11-10 00:37:17 +00:00
Ramji Jiyani
d0bdbdcadf ANDROID: GKI: Convert USB ACM as GKI module
CONFIG_USB_ACM:

This driver supports USB modems and ISDN adapters
which support the Communication Device Class
Abstract Control Model interface.

Bug: 232431151
Test: TH
Change-Id: I15e07607121546eee4e6fa6b8bd8a8fd510a02d9
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
2022-11-09 23:31:43 +00:00
Yongqin Liu
86a1084d09 ANDROID: db845c: BUILD.bazel: add GKI CAN modules
As the GKI CAN modules are requrired by the db845c mcp251xfd
module, here add the list of the GKI CAN modules,
so that they will be copied to the db845c build dist directory.

Fixes: cfbff2d199 ("ANDROID: GKI: Add CAN adapters as GKI modules")
Test: boot with the db845c android14-5.15 build

Change-Id: I2ff55e2e1795f889f88cbebb7f1bec3c5daff67e
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
2022-11-08 21:10:11 +00:00
Yifan Hong
943d5a70d5 ANDROID: kleaf: //common:all_headers should use linux_includes.
A new attribute, linux_includes, is added to ddk_headers to
denote that certain include directories should be added
to LINUXINCLUDE, not ccflags-y.

Change includes to linux_includes for the allowlist of
ddk_headers targets in //common. These are already
added to LINUXINCLUDE in common/Makefile, but we should
make them explicit in BUILD files too so the ordering can
be listed clearly in BUILD files.

Test: build cuttlefish with DDK
Bug: 257342715

Change-Id: I97678264b37036cb5ab86973428e4e0d7f5b645d
Signed-off-by: Yifan Hong <elsk@google.com>
2022-11-04 17:08:06 +00:00
Ramji Jiyani
cfbff2d199 ANDROID: GKI: Add CAN adapters as GKI modules
Add CAN related non bus drivers as GKI modules.

Bug: 229934827
Bug: 232431151
Test: TH
Change-Id: I5d876363a0ea3007e5a83bbca53dcaae1e09e707
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
2022-11-02 17:43:55 +00:00
Ramji Jiyani
9bb8b08464 ANDROID: GKI: BUILD.bazel: Clean up modules list
Create a generic global list for GKI modules' list
and use that instead of cluttering the long list in
every target to keep it more robust and readable.

Bug: 232431151
Test: TH
Change-Id: Ib7f7be7988204c483519be0b38a90007d54b7912
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
2022-11-01 21:24:44 +00:00
Yifan Hong
366ac32d7d ANDROID: Split x86 and arm64 DDK headers.
The ddk_headers targets should be architecture specific; that
is, an x86_64 ddk_module should not be able to see arm64 headers,
and vice versa.

Since the majority of devices is arm64, the //common:all_headers
alias points to //common:all_headers_aarch64. x86_64 devices
can use //common:all_headers_x86_64 instead.

After this change:

- arm64 ddk_modules can continue depending on //common:all_headers, or
  they can depend on //common:all_headers_aarch64 to be explicit.
  In this case, they will not see the x86 headers.
- x86 ddk_modules can depend on //common:all_headers_x86_64.
  In this case, they will not see the arm64 headers.
- unsafe headers under drivers/ are not splitted; they aren't arch specific.

This change ensures that e.g. virtual_device_x86_64 does not
search the headers from the arm64 folders.

Test: bazel build //common:all_headers
Test: bazel build --allow_ddk_unsafe_headers_set //common:all_headers
Bug: 256225968
Signed-off-by: Yifan Hong <elsk@google.com>
Change-Id: I80dd33fb4c0e93dcba3e0714f9fd67d78596ab15
2022-10-31 22:31:11 +00:00
Ramji Jiyani
39228dd9f2 ANDROID: GKI: BUILD.bazel: Add buildifier sort hint
Add buildifier sorting directives for modules lists
to catch non sorted lists in presubmit as well as
to help sort lists using the buildifier.

Bug: 232431151
Test: TH
Change-Id: I508652429f26f85ce5d760024574d68d63f2da9e
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
2022-10-27 22:39:20 +00:00
Ramji Jiyani
94afa3c4e0 ANDROID: GKI: BUILD.bazel: Cleanup sync comments
In preparation of going away from the build.config.*,
remove the comments to keep bazel in sync with them.

Bug: 232431151
Test: TH
Change-Id: Iadf09d1a7c5afbbfdafb8225471352a48842be34
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
2022-10-27 18:40:43 +00:00
Ramji Jiyani
8fdddc52af ANDROID: GKI: BUILD.bazel: Clean up module order
Sort modules listing in an ascending order,
since order is not important.

Bug: 232431151
Test: TH
Change-Id: Icaad772671bf3d6a78ce1fda84b3a6fe566df0f6
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
2022-10-27 18:38:12 +00:00
Ramji Jiyani
5659cc62f1 ANDROID: GKI: Convert cfg/mac80211 as modules
Bug: 232431151
Test: TH
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Change-Id: I46dd381c9eb0d758e9808865692415651626941e
2022-10-27 17:44:55 +00:00
Ramji Jiyani
44e9b82e01 ANDROID: GKI: x86_64: zram & zsmalloc as modules
Enable zram and zsmalloc as modules to be in sync
with the aarch64 builds.

Bug: 232431151
Test: TH
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Change-Id: I55053eeb6beda342689c854f95f4307871a3729b
2022-10-27 02:54:40 +00:00
Yifan Hong
3d56edf4a9 ANDROID: kleaf: Initial list of ddk_headers (2: virtual_device_x86_64)
This CL includes headers used by the external modules
of virtual_device_x86_64.

Allowlist: This is a list of headers and a list of
include directories that are known to be safe
to be used by modules.

- This list includes:
  - Everything under
    - arch/x86/include
    - include

Unsafe list: This is the list of headers that are known to be used
by the external modules of virtual_device_x86_64, minus allowlist.
This means, with the allowlist and unsafe list, the certain Pixel
device kernel build can be transitioned to DDK without any change
to the source code.

- Note that for cleaness of DDK modules, we may want to
  remove some items in the allowlist of includes and
  require device source code to #include from the
  correct directory.

The command to generate this list is:

bazel run //build/kernel/kleaf:gen_ddk_headers \
  --gen_ddk_headers_target=//common-modules/virtual-device:virtual_device_x86_64_modules_install \
  --gen_ddk_headers_input_archives=//common:kernel_x86_64_ddk_allowlist_headers \
  -- -k

Manual edits:
- arch/arm64/include/ is added back. This is due to a limitation
  of the generation script that globs aren't properly handled.

Bug: 248351908

Signed-off-by: Yifan Hong <elsk@google.com>
Change-Id: I0eae9213493d78a6899aa15c8096f3c7694328a3
2022-10-25 22:58:43 +00:00
Yifan Hong
14e14cc4e9 ANDROID: kleaf: Initial list of ddk_headers (1: Pixel)
This CL includes headers used by the external modules of
a real Pixel device.

Allowlist: This is a list of headers and a list of
include directories that are known to be safe
to be used by modules.

- This list includes:
  - Everything under
    - arch/arm64/include
    - include

Unsafe list: This is the list of headers that are known to be used
by a certain Pixel device kernel build, minus allowlist.
This means, with the allowlist and unsafe list, the certain Pixel
device kernel build can be transitioned to DDK without any change
to the source code.

- Note that for cleaness of DDK modules, we may want to
  remove some items in the allowlist of includes and
  require device source code to #include from the
  correct directory.

The command to generate this list is:

bazel run //build/kernel/kleaf:gen_ddk_headers \
  --gen_ddk_headers_target=//gs/google-modules/soc-modules:slider_modules_install
  -- -k

Manual edits:

- manually removed the following headers that no longer exist on
android14-5.15:

remove hdrs arch/arm64/kvm/hyp/include/nvhe/ffa.h|//common:all_headers_unsafe
remove hdrs arch/arm64/kvm/hyp/include/nvhe/iommu.h|//common:all_headers_unsafe
remove hdrs arch/arm64/kvm/hyp/include/nvhe/pkvm.h|//common:all_headers_unsafe
remove hdrs drivers/scsi/ufs/ufs.h|//common:all_headers_unsafe
remove hdrs drivers/scsi/ufs/ufs_quirks.h|//common:all_headers_unsafe
remove hdrs drivers/scsi/ufs/ufshcd.h|//common:all_headers_unsafe
remove hdrs drivers/scsi/ufs/ufshcd-crypto.h|//common:all_headers_unsafe
remove hdrs drivers/scsi/ufs/ufshcd-pltfrm.h|//common:all_headers_unsafe
remove hdrs drivers/scsi/ufs/ufshci.h|//common:all_headers_unsafe
remove hdrs drivers/scsi/ufs/unipro.h|//common:all_headers_unsafe

- manually remove a source:

remove hdrs lib/vdso/gettimeofday.c|//common:all_headers_unsafe

Bug: 248351908

Change-Id: Ie75c45f1646ec6055dcdb6f49d3001691581c046
Signed-off-by: Yifan Hong <elsk@google.com>
2022-10-24 20:29:13 +00:00
Yifan Hong
ede1fd38ee ANDROID: kleaf: Initial list of ddk_headers (0: skeleton)
Create the skeleton rules for DDK headers, and write comments
with hands.

This CL has no real effect; all targets are declared empty
and content is filled in in follow up CLs.

Allowlist: This is a list of headers and a list of
include directories that are known to be safe
to be used by modules.

Unsafe list: This is the list of headers that are known to be used
by some device kernel build, minus allowlist.
This means, with the allowlist and unsafe list, an unspecified
device kernel build can be transitioned to DDK without any change
to the source code.

- Note that for cleaness of DDK modules, we may want to
  remove some items in the allowlist of includes and
  require device source code to #include from the
  correct directory.

Bug: 248351908

Signed-off-by: Yifan Hong <elsk@google.com>
Change-Id: I4f15d2fac703bc3b7100a72e90f289236db3e7e5
2022-10-24 20:28:48 +00:00
Alistair Delva
2f81119adf ANDROID: kleaf: add 16k variant of kernel_aarch64
Bug: 234045848
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: Ie8ba8a49347fc28ac9caa37dbcf82597344464e9
2022-09-30 23:12:07 +00:00
Alistair Delva
4c43a506ef ANDROID: GKI: Build-in REGMAP_SPMI
REGMAP_SPMI is a hidden symbol normally selected by other SPMI drivers,
but it wasn't built-in to GKI like other REGMAP APIs so vendors had to
build it downstream.

This is a small amount of code and can be modularized later.

For allmodconfig, select SPMI via Kconfig.gki instead of gki_defconfig,
because otherwise allmodconfig will build SPMI=m and REGMAP_SPMI=y,
which is not allowed.

Bug: 248307451
Signed-off-by: Alistair Delva <adelva@google.com>
Change-Id: Ic3833e3a2dc44386c12a2422562994a1581a549c
2022-09-23 12:38:00 -07:00
Ramji Jiyani
44e8479df1 ANDROID: GKI: Remove unused symbol lists
Symbol lists which are not updated after the fork
from the 13-5.15 kernel are deleted to force
regeneration of those lists when needed.

Remove stale symbols from the remaining lists.
Stale symbols (exported in 13-5.15 but not in 14-5.15):
- kfree_skb
- tty_schedule_flip

Bug: 248334110
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Change-Id: Icc5ef9feb9f5268ac19a84979951c3e15afc2af5
2022-09-22 22:22:26 +00:00
Yifan Hong
b8323be61d ANDROID: kleaf: Explicit list of ABI files.
In BUILD.bazel, explicitly list abi_definition,
kmi_symbol_list, and additional_kmi_symbol_lists.
This avoids using the glob expression which may
accidentally match editor backup files.

Bug: 246344503
Test: TH
Change-Id: I8fbad63bf744672ba5b76b51cc908926d7b10849
Signed-off-by: Yifan Hong <elsk@google.com>
2022-09-19 22:34:09 +00:00
Yifan Hong
b0f8873811 ANDROID: kleaf: convert fips140 to kleaf
As a result of this change:

- fips140 is no longer part of the GKI build but a
  separate module, so it is not signed
  (CONFIG_MODULE_SIG_ALL is not set)

- GKI images (e.g. system_dlkm image, boot images)
  etc. are no longer part of the build -- because
  they are unnecessary.

- The build config no longer inherits from build.config.gki.aarch64
  directly to avoid building unnecessary system_dklm, boot images,
  GKI artifacts, etc.

Test: BUILD_CONFIG=common/build.config.gki.aarch64.fips140 build/build.sh
Test: tools/bazel build //common:fips140_dist
Bug: 232083350

Change-Id: I2cb0ee0b55c2a5ea46e6d73ecad4aa97585c1989
Signed-off-by: Yifan Hong <elsk@google.com>
2022-09-13 15:48:16 -07:00
Ulises Mendez Martinez
b856e6cf38 ANDROID: Convert db845c to a mixed build.
* This means using GKI[0] artifacts as base for the kernel.

[0] https://source.android.com/docs/core/architecture/kernel/generic-kernel-image#fragmentation-fix-gki

* It was initially submitted as part of https://r.android.com/q/topic:db845c_mixed_build but then reverted in https://r.android.com/q/topic:revert-2188970-db845c_mixed_build-YESQWWKQCV

* https://android-review.googlesource.com/c/kernel/common/+/2203435 fixes the previous reason for reverting, making it safe to submit it again.

Bug: 233404531
Signed-off-by: Ulises Mendez Martinez <umendez@google.com>
Change-Id: I18813d34b4b7f9de54c334e47c6478ff235cf37f
2022-09-06 23:21:51 +00:00
Yifan Hong
b4201bbc98 ANDROID: kleaf: Do not include GKI modules in default output of //common:kernel_aarch64.
When a device kernel builds their own modules that
conflicts with the GKI modules (zram and zsmalloc
for android13-5.15), the dist target will produce a
warning about conflicting source files.

Hence, do not include zram and zsmalloc to the device
dist targets by default when they include //common:kernel_aarch64
only.

If they wish to include zram and zsmalloc in
the distribution on the android13-5.15 branch,
they may add the following to the
dist target:

  "//common:kernel_aarch64_modules",

or individual modules:

  "//common:kernel_aarch64/drivers/block/zram/zram.ko",
  "//common:kernel_aarch64/mm/zsmalloc.ko",

//common:kernel_aarch64_dist continues to include GKI
modules defined by the branch.

Bug: 244215515
Test: manual
Change-Id: Iae701d7d452e6ed3a849fdfd03550551ca2af17e
Signed-off-by: Yifan Hong <elsk@google.com>
2022-09-02 21:24:41 +00:00
Ulises Mendez Martinez
cd68e142bc Revert "ANDROID: Convert db845c to a mixed build."
Revert "ANDROID: Convert db845c to a mixed build."

Revert submission 2188970-db845c_mixed_build

Reason for revert: It breaks android-mainline
Reverted Changes:
I6cfb1ef19:ANDROID: Convert db845c to a mixed build.
I6680cb8ef:kleaf: Convert db845c to a mixed build.
I6cfb1ef19:ANDROID: Convert db845c to a mixed build.

Signed-off-by: Ulises Mendez Martinez <umendez@google.com>
Change-Id: I0b7b411d2e5cf13aff257b5827479d20092f2b3b
2022-08-23 23:34:04 +00:00
Ulises Mendez Martinez
09bdad5187 ANDROID: Convert db845c to a mixed build.
* This means using GKI[0] artifacts as base for the kernel.

[0] https://source.android.com/docs/core/architecture/kernel/generic-kernel-image#fragmentation-fix-gki

Bug: 233404531
Signed-off-by: Ulises Mendez Martinez <umendez@google.com>
Change-Id: I6cfb1ef1904e4b8d2755552ea139f150ce09db90
2022-08-23 19:48:53 +00:00
Yifan Hong
54fc960b31 ANDROID: disable trimming for ARM64.
Turn off trimming of symbols so we do not need to keep a set of valid
symbol tables during the development cycle of the android14-5.15 branch.

Bug: 188620248
Change-Id: I4f3bc558aca8432b77e7a855bcc75443e7af8ba3
Signed-off-by: Yifan Hong <elsk@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2022-07-26 18:34:00 +00:00
Ramji Jiyani
b519faae30 ANDROID: ABI: gki_defconfig: disable cfg80211 and mac80211
Remove CONFIG_CFG80211 and CONFIG_MAC80211 from gki_defconfig
to allow vendors to incorporate features that lands upstream
after KMI freeze.

Also need to update symbol lists since the related 80211
symbols are no longer exported from the core kernel.

Bug: 227176212
Test: TH
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Change-Id: Ia680c2b38d5f13263e318f8c5eaa42f591385736
(cherry picked from commit b24cd8be89)
Signed-off-by: Carlos Llamas <cmllamas@google.com>
2022-07-19 12:47:39 +00:00
Ramji Jiyani
9175f6bc79 ANDROID: db845c: Add zram and zsmalloc to module_outs
db845c is not a mixed build yet, so need to add GKI
modules to it's module_outs for kleaf builds to
resolve hard failures in kleaf build for module copy.

Bug: 230519159
Test: tools/bazel run //common:db845c_dist
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Change-Id: If3ce64a2b5f6b2f019a393f4674de30ac7437069
2022-07-16 17:06:39 +00:00
Ramji Jiyani
2f72cfb4a4 ANDROID: GKI: ZSMALLOC & ZRAM as modules for arm64
Enable zram and zsmalloc (dependency for zram) as
unprotected modules for aarch64. These are already
being used as modules by the vendor currently; so
needs to be unprotected.

Bug: 230519159
Test: TH
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Change-Id: I7c617c1a24f6e083301cbed67d0d323388cbd622
2022-07-16 17:06:39 +00:00
Yifan Hong
c0ef6692da ANDROID: kleaf: format BUILD.bazel.
Run buildifier to format BUILD.bazel file
to keep things sorted.

Bug: 188620248
Test: no lint errors
Change-Id: I2b5ff358e28580094b49550e1145961e9c76a430
Signed-off-by: Yifan Hong <elsk@google.com>
2022-07-08 11:21:00 -07:00