diff options
author | Ji Soo Shin <jisshin@google.com> | 2023-05-05 14:41:28 +0200 |
---|---|---|
committer | Ji Soo Shin <jisshin@google.com> | 2023-05-09 13:02:40 +0200 |
commit | c7e4bc6168648e93a5183b1d5b3e1f05c029f802 (patch) | |
tree | 058d383c17dceb5e8cec624edefdf80af4af4930 | |
parent | 1d6023da1036a3ad0638b7ba46f1508ed3263e75 (diff) | |
download | trusty-c7e4bc6168648e93a5183b1d5b3e1f05c029f802.tar.gz |
ANDROID: trusty: move to external standalone repo
It does not make sense for Trusty repo to stay with SoC
specific modules in soc/gs.
Additionally following changes are required to build
successfully and compile.
Bug: 271907961
Change-Id: Ie7b37603531079fdda4421b3a35af5294ee1158f
Signed-off-by: Ji Soo Shin <jisshin@google.com>
-rw-r--r-- | BUILD.bazel | 53 | ||||
-rw-r--r-- | Kbuild | 5 | ||||
-rw-r--r-- | Makefile | 11 | ||||
-rw-r--r-- | drivers/trusty/Kbuild | 4 | ||||
-rw-r--r-- | drivers/trusty/trusty-log.c | 2 | ||||
-rw-r--r-- | drivers/trusty/trusty-sched-share-api.h | 2 | ||||
-rw-r--r-- | drivers/trusty/trusty-sched-share.c | 1 |
7 files changed, 73 insertions, 5 deletions
diff --git a/BUILD.bazel b/BUILD.bazel new file mode 100644 index 0000000..e7a74b1 --- /dev/null +++ b/BUILD.bazel @@ -0,0 +1,53 @@ +# SPDX-License-Identifier: GPL-2.0 + +load("//build/kernel/kleaf:kernel.bzl", "kernel_module") + +filegroup( + name = "headers", + srcs = glob([ + "include/**/*.h", + ]), + visibility = [ + "//private/google-modules/aoc:__pkg__", + "//private/google-modules/hdcp/samsung:__pkg__", + "//private/google-modules/soc/gs:__pkg__", + ], +) + +filegroup( + name = "trusty.kconfig", + srcs = glob([ + "drivers/trusty/Kconfig", + ]), + visibility = [ + "//private/devices/google:__subpackages__", + "//private/google-modules/soc/gs:__pkg__", + ], +) + +kernel_module( + name = "trusty", + srcs = glob([ + "drivers/trusty/*.c", + "drivers/trusty/*.h", + "drivers/trusty/*.S", + "drivers/trusty/Kbuild", + "Kbuild", + ]) + [ + "//private/google-modules/soc/gs:gs_soc_headers", + "//private/google-modules/trusty:headers", + ], + outs = [ + "trusty-core.ko", + "trusty-ipc.ko", + "trusty-log.ko", + "trusty-test.ko", + "trusty-virtio.ko", + ], + kernel_build = "//private/google-modules/soc/gs:gs_kernel_build", + visibility = [ + "//private/devices/google:__subpackages__", + "//private/google-modules/hdcp/samsung:__pkg__", + "//private/google-modules/soc/gs:__pkg__", + ], +) @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0 + +subdir-ccflags-y += -I$(srctree)/$(src)/include + +obj-y += drivers/trusty/ diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8e4db7f --- /dev/null +++ b/Makefile @@ -0,0 +1,11 @@ +M ?= $(shell pwd) + +KBASE_PATH_RELATIVE = $(M) + +EXTRA_CFLAGS += -Werror + +include $(KERNEL_SRC)/../private/google-modules/soc/gs/Makefile.include + +modules modules_install clean: + $(MAKE) -C $(KERNEL_SRC) M=$(M) W=1 \ + EXTRA_CFLAGS="$(EXTRA_CFLAGS)" KBUILD_EXTRA_SYMBOLS="$(EXTRA_SYMBOLS)" $(@) diff --git a/drivers/trusty/Kbuild b/drivers/trusty/Kbuild index 538352f..1efdd13 100644 --- a/drivers/trusty/Kbuild +++ b/drivers/trusty/Kbuild @@ -4,9 +4,7 @@ # # Needed for the trace points -CFLAGS_trusty.o = -I$(srctree)/$(src) -CFLAGS_trusty-irq.o = -I$(srctree)/$(src) -CFLAGS_trusty-ipc.o = -I$(srctree)/$(src) +ccflags-y += -I$(srctree)/$(src)/ obj-$(CONFIG_TRUSTY) += trusty-core.o trusty-core-objs += trusty.o trusty-mem.o trusty-sched-share.o diff --git a/drivers/trusty/trusty-log.c b/drivers/trusty/trusty-log.c index 0c5a121..425441f 100644 --- a/drivers/trusty/trusty-log.c +++ b/drivers/trusty/trusty-log.c @@ -677,7 +677,7 @@ static int trusty_log_sfile_dev_release(struct inode *inode, return 0; } -ssize_t trusty_log_sfile_dev_read(struct file *filp, char __user *buf, +static ssize_t trusty_log_sfile_dev_read(struct file *filp, char __user *buf, size_t size, loff_t *ppos) { struct seq_file *sfile; diff --git a/drivers/trusty/trusty-sched-share-api.h b/drivers/trusty/trusty-sched-share-api.h index 412704a..58c76d7 100644 --- a/drivers/trusty/trusty-sched-share-api.h +++ b/drivers/trusty/trusty-sched-share-api.h @@ -21,7 +21,7 @@ void trusty_unregister_sched_share(struct trusty_sched_share_state *sched_share_ void trusty_free_sched_share(struct trusty_sched_share_state *sched_share_state); int trusty_get_requested_nice(unsigned int cpu_num, struct trusty_sched_share_state *tcpu_state); -int trusty_set_actual_nice(unsigned int cpu_num, struct trusty_sched_share_state *tcpu_state, +void trusty_set_actual_nice(unsigned int cpu_num, struct trusty_sched_share_state *tcpu_state, int nice); #endif /* _TRUSTY_SCHED_SHARE_API_H_ */ diff --git a/drivers/trusty/trusty-sched-share.c b/drivers/trusty/trusty-sched-share.c index 3670bf4..07b0d7e 100644 --- a/drivers/trusty/trusty-sched-share.c +++ b/drivers/trusty/trusty-sched-share.c @@ -12,6 +12,7 @@ #include <linux/scatterlist.h> #include <linux/trusty/trusty.h> #include "trusty-sched-share.h" +#include "trusty-sched-share-api.h" /** * struct trusty_sched_share_state - Trusty share resources state local to Trusty-Driver |