[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1546872766-3354-2-git-send-email-firoz.khan@linaro.org>
Date: Mon, 7 Jan 2019 20:22:44 +0530
From: Firoz Khan <firoz.khan@...aro.org>
To: Mark Salter <msalter@...hat.com>,
Aurelien Jacquiot <jacquiot.aurelien@...il.com>,
Michal Simek <michal.simek@...inx.com>,
linux-c6x-dev@...ux-c6x.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Philippe Ombredanne <pombredanne@...b.com>,
Thomas Gleixner <tglx@...utronix.de>,
Kate Stewart <kstewart@...uxfoundation.org>
Cc: y2038@...ts.linaro.org, linux-kernel@...r.kernel.org,
linux-arch@...r.kernel.org, arnd@...db.de, deepa.kernel@...il.com,
marcin.juszkiewicz@...aro.org, firoz.khan@...aro.org
Subject: [PATCH 1/3] c6x: add Makefile to invoke syscall table generation script
Add Makefile to invoke the system call table generation script
which is placed in scripts directory as a common location acc-
essible for all the architectures.
scripts/syscallhdr.sh will generate uapi header and scripts-
/syscalltbl.sh will generate kapi header respectively. There
is another scripts scripts/syscallnr.sh can generate total
number of syscall which doesn't invoke from this Makefile.
Signed-off-by: Firoz Khan <firoz.khan@...aro.org>
---
arch/c6x/kernel/syscalls/Makefile | 41 +++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
create mode 100644 arch/c6x/kernel/syscalls/Makefile
diff --git a/arch/c6x/kernel/syscalls/Makefile b/arch/c6x/kernel/syscalls/Makefile
new file mode 100644
index 0000000..1865a80
--- /dev/null
+++ b/arch/c6x/kernel/syscalls/Makefile
@@ -0,0 +1,41 @@
+# SPDX-License-Identifier: GPL-2.0
+kapi := arch/$(SRCARCH)/include/generated/asm
+uapi := arch/$(SRCARCH)/include/generated/uapi/asm
+
+_dummy := $(shell [ -d '$(uapi)' ] || mkdir -p '$(uapi)') \
+ $(shell [ -d '$(kapi)' ] || mkdir -p '$(kapi)')
+
+syscall := $(srctree)/scripts/syscalls/syscall.tbl
+syshdr := $(srctree)/scripts/syscallhdr.sh
+systbl := $(srctree)/scripts/syscalltbl.sh
+
+quiet_cmd_syshdr = SYSHDR $@
+ cmd_syshdr = $(CONFIG_SHELL) '$(syshdr)' '$<' '$@' \
+ '$(syshdr_abis_$(basetarget))' \
+ '$(syshdr_pfx_$(basetarget))' \
+ '$(syshdr_offset_$(basetarget))'
+
+quiet_cmd_systbl = SYSTBL $@
+ cmd_systbl = $(CONFIG_SHELL) '$(systbl)' '$<' '$@' \
+ '$(systbl_abis_$(basetarget))' \
+ '$(systbl_abi_$(basetarget))' \
+ '$(systbl_offset_$(basetarget))'
+
+syshdr_abis_unistd_32 := common,32,rename,stat64,archs0
+$(uapi)/unistd_32.h: $(syscall) $(syshdr)
+ $(call if_changed,syshdr)
+
+systbl_abis_syscall_table := common,32,rename,stat64,archs0
+systbl_abi_syscall_table := 32
+$(kapi)/syscall_table.h: $(syscall) $(systbl)
+ $(call if_changed,systbl)
+
+uapisyshdr-y += unistd_32.h
+kapisyshdr-y += syscall_table.h
+
+targets += $(uapisyshdr-y) $(kapisyshdr-y)
+
+PHONY += all
+all: $(addprefix $(uapi)/,$(uapisyshdr-y))
+all: $(addprefix $(kapi)/,$(kapisyshdr-y))
+ @:
--
1.9.1
Powered by blists - more mailing lists