From 286b0bc9c9b44a42f9cfcf1a5c1ffa17a8e8314a Mon Sep 17 00:00:00 2001 From: Karol Lewandowski Date: Thu, 25 Nov 2021 12:35:51 +0100 Subject: [PATCH] Add ability to not build all modules This is going to be used by clients of -source package. Change-Id: Ieb7be8aa0a169951356b554947a9ab978346346e --- kernel/Makefile | 10 ++++++++-- packaging/linux-tizen-modules-source.spec | 2 +- packaging/linux-tizen-modules.spec | 5 ++++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/kernel/Makefile b/kernel/Makefile index 16b724f..51f5bb4 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -5,8 +5,14 @@ LD = ${CROSS_COMPILE}ld CFLAGS_logger.o += -Wno-error=missing-attributes CFLAGS_proc-tsm.o += -Wno-error=missing-attributes -obj-m += logger.o -obj-m += proc-tsm.o +# Build is disabled by default so that when new module is added to this repository (and -source package), +# it won't get automatically build in packages using it (that would break these automatically as file list +# would no longer match). +BUILD_logger ?= n +BUILD_proc_tsm ?= n + +obj-$(BUILD_logger) += logger.o +obj-$(BUILD_proc_tsm) += proc-tsm.o all: make -C $(KERNELDIR) M=$(PWD) modules diff --git a/packaging/linux-tizen-modules-source.spec b/packaging/linux-tizen-modules-source.spec index 48a285d..aa45713 100644 --- a/packaging/linux-tizen-modules-source.spec +++ b/packaging/linux-tizen-modules-source.spec @@ -1,5 +1,5 @@ Name: linux-tizen-modules-source -Version: 7.0.0 +Version: 7.0.1 Release: 0 License: GPL-2.0+ Source0: %{name}-%{version}.tar.xz diff --git a/packaging/linux-tizen-modules.spec b/packaging/linux-tizen-modules.spec index 962eec8..13a41cc 100644 --- a/packaging/linux-tizen-modules.spec +++ b/packaging/linux-tizen-modules.spec @@ -7,7 +7,7 @@ %endif Name: linux-tizen-modules -Version: 7.0.0 +Version: 7.0.1 Release: 0 License: GPL-2.0+ Source0: %{name}-%{version}.tar.xz @@ -58,6 +58,9 @@ Provides: stability-monitor-kernel-module cp %{SOURCE1} ./%{name}.manifest %build +export BUILD_logger=m +export BUILD_proc_tsm=m + make -C kernel clean KERNELDIR=/boot/kernel/devel/kernel-devel-%{buildarch}-rpi3 make -C kernel KERNELDIR=/boot/kernel/devel/kernel-devel-%{buildarch}-rpi3/ make -C kernel modules_install KERNELDIR=/boot/kernel/devel/kernel-devel-%{buildarch}-rpi3 INSTALL_MOD_STRIP=1 -- 2.7.4