From 334e03a248e87ded4e16e1549c5c7afc1eb484cc Mon Sep 17 00:00:00 2001 From: Karol Lewandowski Date: Wed, 5 Jan 2022 17:33:20 +0100 Subject: [PATCH] Add tm1 package with logger.ko Change-Id: I3d2d79b57a1be9f1806981a7fd02c709e0955da4 (cherry picked from commit 3817692b3e472375835aabfe664547c51e771fd6) --- conf/tizen-modules-tm1.conf | 1 + packaging/linux-tizen-modules.spec | 48 +++++++++++++++++++++++++++++- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 conf/tizen-modules-tm1.conf diff --git a/conf/tizen-modules-tm1.conf b/conf/tizen-modules-tm1.conf new file mode 100644 index 0000000..7c82fcf --- /dev/null +++ b/conf/tizen-modules-tm1.conf @@ -0,0 +1 @@ +logger diff --git a/packaging/linux-tizen-modules.spec b/packaging/linux-tizen-modules.spec index 105d34b..fecb84c 100644 --- a/packaging/linux-tizen-modules.spec +++ b/packaging/linux-tizen-modules.spec @@ -1,4 +1,5 @@ -%define KMOD_PATH /lib/modules/ +%define KMOD_PATH /lib/modules +%define KMOD_PATH_TM1 /boot/kernel/mod_tizen_tm1/lib/modules %ifarch aarch64 %define buildarch arm64 @@ -22,6 +23,9 @@ BuildRequires: %{buildarch}-rpi4-linux-kernel-devel %ifarch aarch64 BuildRequires: kernel-devel-exynos9110-tw3 %endif +%ifnarch aarch64 +BuildRequires: kernel-devel-3.10-sc7730 +%endif %description %package rpi3 @@ -54,6 +58,18 @@ Provides: stability-monitor-kernel-module %description tw3 %endif +%ifnarch aarch64 +%package tm1 +Summary: Tizen modules for TM1 +Requires: linux-3.10-sc7730_tizen_tm1 +AutoReqProv: no +Requires(post): bash +Requires(post): coreutils +Requires(post): findutils +Requires(post): kmod-compat +%description tm1 +%endif + %prep %setup -q cp %{SOURCE1} ./%{name}.manifest @@ -84,6 +100,14 @@ make -C kernel KERNELDIR=/boot/kernel/devel/kernel-devel-tw3 make -C kernel modules_install KERNELDIR=/boot/kernel/devel/kernel-devel-tw3 INSTALL_MOD_STRIP=1 %endif +export BUILD_proc_tsm=n + +%ifnarch aarch64 +make -C kernel clean KERNELDIR=/boot/kernel/devel/kernel-devel-tizen_tm1 +make -C kernel KERNELDIR=/boot/kernel/devel/kernel-devel-tizen_tm1 +make -C kernel modules_install KERNELDIR=/boot/kernel/devel/kernel-devel-tizen_tm1 INSTALL_MOD_STRIP=1 +%endif + %install mkdir -p %{buildroot}/%{KMOD_PATH} @@ -111,6 +135,12 @@ mkdir -p %{buildroot}/aarch64/modules/modules-load.d install -m 644 conf/tizen-modules-tw3.conf %{buildroot}/aarch64/modules/modules-load.d %endif +%ifnarch aarch64 +mkdir -p %{buildroot}/%{KMOD_PATH_TM1}/modules-load.d +install -m 644 conf/tizen-modules-tm1.conf %{buildroot}/%{KMOD_PATH_TM1}/modules-load.d +mv -v %{buildroot}/%{KMOD_PATH}/*3.10* %{buildroot}/%{KMOD_PATH_TM1} +%endif + %clean rm -rf %{buildroot} rm -rf %{_builddir}/%{name}-%{version}/lib @@ -123,6 +153,14 @@ RELEASEVERSION=$(basename $(dirname `find /lib/modules -name extra | head -1`)) RELEASEVERSION=$(basename $(dirname `find /lib/modules -name extra | head -1`)) /sbin/depmod -a $RELEASEVERSION +%ifnarch aarch64 +%post tm1 +KMOD_PATH_TM1=%{KMOD_PATH_TM1} +KMOD_BASEPATH=${KMOD_PATH_TM1%%%{KMOD_PATH}} +RELEASEVERSION=$(basename $(dirname `find $KMOD_PATH_TM1 -name extra | head -1`)) +/sbin/depmod -b ${KMOD_BASEPATH} -a $RELEASEVERSION +%endif + %files rpi3 %manifest %{name}.manifest %license COPYING @@ -145,3 +183,11 @@ RELEASEVERSION=$(basename $(dirname `find /lib/modules -name extra | head -1`)) /aarch64/modules/modprobe.d/tizen-modprobe-tw3.conf /aarch64/modules/modules-load.d/tizen-modules-tw3.conf %endif + +%ifnarch aarch64 +%files tm1 +%manifest %{name}.manifest +%license COPYING +%{KMOD_PATH_TM1}/*3.10*/extra +%{KMOD_PATH_TM1}/modules-load.d/tizen-modules-tm1.conf +%endif -- 2.34.1