From d93a18f27e3701a8cdc2228aee1c22451d1292e4 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Sat, 27 Apr 2019 12:33:36 +0900 Subject: kbuild: move samples/ to KBUILD_VMLINUX_OBJS Handle samples/ like the other top-level directories to simplify the Makefile. Include include/config/auto.conf earlier to evaluate drivers-$(CONFIG_SAMPLES). Signed-off-by: Masahiro Yamada --- samples/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'samples') diff --git a/samples/Makefile b/samples/Makefile index b1142a958811..50f858612148 100644 --- a/samples/Makefile +++ b/samples/Makefile @@ -1,6 +1,6 @@ # Makefile for Linux samples code -obj-$(CONFIG_SAMPLES) += kobject/ kprobes/ trace_events/ livepatch/ \ +obj-y += kobject/ kprobes/ trace_events/ livepatch/ \ hw_breakpoint/ kfifo/ kdb/ hidraw/ rpmsg/ seccomp/ \ configfs/ connector/ v4l/ trace_printk/ \ vfio-mdev/ statx/ qmi/ binderfs/ -- cgit From 7206c1247416f2c62ce38b65994b5e74fefe2e2b Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Sat, 27 Apr 2019 12:33:39 +0900 Subject: samples: seccomp: turn CONFIG_SAMPLE_SECCOMP into a bool option The prompt of CONFIG_SAMPLE_SECCOMP claims this is "loadable module only", which is invalid. samples/seccomp/ only contains host programs, so having it tristate is pointless. Signed-off-by: Masahiro Yamada --- samples/Kconfig | 4 ++-- samples/seccomp/Makefile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'samples') diff --git a/samples/Kconfig b/samples/Kconfig index d19754ccad08..b98a763a9b72 100644 --- a/samples/Kconfig +++ b/samples/Kconfig @@ -103,8 +103,8 @@ config SAMPLE_CONNECTOR See also Documentation/connector/connector.txt config SAMPLE_SECCOMP - tristate "Build seccomp sample code -- loadable modules only" - depends on SECCOMP_FILTER && m + bool "Build seccomp sample code" + depends on SECCOMP_FILTER help Build samples of seccomp filters using various methods of BPF filter construction. diff --git a/samples/seccomp/Makefile b/samples/seccomp/Makefile index fb43a814d4c0..00e0b5e90bd0 100644 --- a/samples/seccomp/Makefile +++ b/samples/seccomp/Makefile @@ -40,5 +40,5 @@ HOSTLDLIBS_bpf-fancy += $(MFLAG) HOSTLDLIBS_dropper += $(MFLAG) HOSTLDLIBS_user-trap += $(MFLAG) endif -always := $(hostprogs-m) +always := $(hostprogs-y) endif -- cgit From e7e3491761a46a63ce504388075e262192ea542e Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Sat, 27 Apr 2019 12:33:40 +0900 Subject: samples: kobject: allow CONFIG_SAMPLE_KOBJECT to become y This sample works well as builtin. Signed-off-by: Masahiro Yamada --- samples/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'samples') diff --git a/samples/Kconfig b/samples/Kconfig index b98a763a9b72..399ae533bba9 100644 --- a/samples/Kconfig +++ b/samples/Kconfig @@ -20,8 +20,7 @@ config SAMPLE_TRACE_PRINTK test various trace_printk() calls from a module. config SAMPLE_KOBJECT - tristate "Build kobject examples -- loadable modules only" - depends on m + tristate "Build kobject examples" help This config option will allow you to build a number of different kobject sample modules showing how to use kobjects, -- cgit