mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-18 07:09:36 +02:00
ANDROID: rust_binder: Switch Rust Binder to GKI Module
Convert Rust Binder to be buildable as a GKI module. Bug: 347787965 Change-Id: I9caa8582a6240db52933de40cdf2afb46b69817a Signed-off-by: Matthew Maurer <mmaurer@google.com>
This commit is contained in:
parent
b511e79bc5
commit
cb0bef6d8e
|
@ -1,4 +1,5 @@
|
||||||
arch/arm64/geniezone/gzvm.ko
|
arch/arm64/geniezone/gzvm.ko
|
||||||
|
drivers/android/rust_binder.ko
|
||||||
drivers/bluetooth/btbcm.ko
|
drivers/bluetooth/btbcm.ko
|
||||||
drivers/bluetooth/btqca.ko
|
drivers/bluetooth/btqca.ko
|
||||||
drivers/bluetooth/btsdio.ko
|
drivers/bluetooth/btsdio.ko
|
||||||
|
|
|
@ -26,7 +26,7 @@ config ANDROID_BINDER_IPC_C
|
||||||
If unsure, pick the C implementation.
|
If unsure, pick the C implementation.
|
||||||
|
|
||||||
config ANDROID_BINDER_IPC_RUST
|
config ANDROID_BINDER_IPC_RUST
|
||||||
bool "Android Binder IPC Driver in Rust"
|
tristate "Android Binder IPC Driver in Rust"
|
||||||
depends on ANDROID_BINDER_IPC && RUST
|
depends on ANDROID_BINDER_IPC && RUST
|
||||||
help
|
help
|
||||||
Enable the Rust implementation of the Android Binder IPC Driver.
|
Enable the Rust implementation of the Android Binder IPC Driver.
|
||||||
|
|
|
@ -5,8 +5,12 @@ obj-$(CONFIG_ANDROID_BINDER_IPC) += binder_pick_impl.o
|
||||||
obj-$(CONFIG_ANDROID_BINDERFS_C) += binderfs.o
|
obj-$(CONFIG_ANDROID_BINDERFS_C) += binderfs.o
|
||||||
obj-$(CONFIG_ANDROID_BINDER_IPC_C) += binder.o binder_alloc.o
|
obj-$(CONFIG_ANDROID_BINDER_IPC_C) += binder.o binder_alloc.o
|
||||||
obj-$(CONFIG_ANDROID_BINDER_IPC_SELFTEST) += binder_alloc_selftest.o
|
obj-$(CONFIG_ANDROID_BINDER_IPC_SELFTEST) += binder_alloc_selftest.o
|
||||||
obj-$(CONFIG_ANDROID_BINDERFS_RUST) += binder/rust_binderfs.o
|
|
||||||
obj-$(CONFIG_ANDROID_BINDER_IPC_RUST) += binder/rust_binder.o
|
|
||||||
obj-$(CONFIG_ANDROID_DEBUG_SYMBOLS) += android_debug_symbols.o
|
obj-$(CONFIG_ANDROID_DEBUG_SYMBOLS) += android_debug_symbols.o
|
||||||
obj-$(CONFIG_ANDROID_VENDOR_HOOKS) += vendor_hooks.o
|
obj-$(CONFIG_ANDROID_VENDOR_HOOKS) += vendor_hooks.o
|
||||||
obj-$(CONFIG_ANDROID_DEBUG_KINFO) += debug_kinfo.o
|
obj-$(CONFIG_ANDROID_DEBUG_KINFO) += debug_kinfo.o
|
||||||
|
obj-$(CONFIG_ANDROID_BINDER_IPC_RUST) += rust_binder.o
|
||||||
|
|
||||||
|
rust_binder-objs := binder/rust_binder.o
|
||||||
|
ifeq ($(CONFIG_ANDROID_BINDERFS_RUST),y)
|
||||||
|
rust_binder-objs += binder/rust_binderfs.o
|
||||||
|
endif
|
||||||
|
|
|
@ -36,6 +36,8 @@
|
||||||
|
|
||||||
#include "binder_internal.h"
|
#include "binder_internal.h"
|
||||||
|
|
||||||
|
MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
|
||||||
|
|
||||||
#define FIRST_INODE 1
|
#define FIRST_INODE 1
|
||||||
#define SECOND_INODE 2
|
#define SECOND_INODE 2
|
||||||
#define INODE_OFFSET 3
|
#define INODE_OFFSET 3
|
||||||
|
|
|
@ -22,12 +22,6 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_ANDROID_BINDER_IPC_RUST
|
|
||||||
#ifdef CONFIG_ANDROID_BINDER_IPC_DEFAULT_IS_RUST
|
|
||||||
#error "The default Binder driver implementation is Rust, but the Rust implementation is disabled"
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONFIG_ANDROID_BINDER_IPC_C
|
#ifndef CONFIG_ANDROID_BINDER_IPC_C
|
||||||
#ifndef CONFIG_ANDROID_BINDER_IPC_DEFAULT_IS_RUST
|
#ifndef CONFIG_ANDROID_BINDER_IPC_DEFAULT_IS_RUST
|
||||||
#error "The default Binder driver implementation is C, but the C implementation is disabled"
|
#error "The default Binder driver implementation is C, but the C implementation is disabled"
|
||||||
|
@ -35,7 +29,9 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool binder_use_rust = IS_ENABLED(CONFIG_ANDROID_BINDER_IPC_DEFAULT_IS_RUST);
|
bool binder_use_rust = IS_ENABLED(CONFIG_ANDROID_BINDER_IPC_DEFAULT_IS_RUST);
|
||||||
|
EXPORT_SYMBOL_GPL(binder_use_rust);
|
||||||
bool binder_driver_initialized;
|
bool binder_driver_initialized;
|
||||||
|
EXPORT_SYMBOL_GPL(binder_driver_initialized);
|
||||||
|
|
||||||
static int binder_param_set(const char *buffer, const struct kernel_param *kp)
|
static int binder_param_set(const char *buffer, const struct kernel_param *kp)
|
||||||
{
|
{
|
||||||
|
|
|
@ -369,7 +369,7 @@ $(obj)/bindings/bindings_helpers_generated.rs: $(src)/helpers.c FORCE
|
||||||
quiet_cmd_exports = EXPORTS $@
|
quiet_cmd_exports = EXPORTS $@
|
||||||
cmd_exports = \
|
cmd_exports = \
|
||||||
$(NM) -p --defined-only $< \
|
$(NM) -p --defined-only $< \
|
||||||
| awk '$$2~/(T|R|D)/ && $$3!~/__cfi/ {printf "EXPORT_SYMBOL_RUST_GPL(%s);\n",$$3}' > $@
|
| awk '$$2~/(T|R|D|B)/ && $$3!~/__cfi/ {printf "EXPORT_SYMBOL_RUST_GPL(%s);\n",$$3}' > $@
|
||||||
|
|
||||||
$(obj)/exports_core_generated.h: $(obj)/core.o FORCE
|
$(obj)/exports_core_generated.h: $(obj)/core.o FORCE
|
||||||
$(call if_changed,exports)
|
$(call if_changed,exports)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user