Enable 64bit 41/236241/2 submit/tizen/20200616.025955
authorKunhoon Baik <knhoon.baik@samsung.com>
Tue, 16 Jun 2020 02:04:31 +0000 (11:04 +0900)
committerKunhoon Baik <knhoon.baik@samsung.com>
Tue, 16 Jun 2020 02:48:46 +0000 (11:48 +0900)
Tizen will support 64 bit binary officially.

Now, Kernel also support 64bit kernel headers
(Related patches)
 - https://review.tizen.org/gerrit/#/c/platform/kernel/linux-rpi/+/235603/
 - https://review.tizen.org/gerrit/#/c/platform/kernel/linux-rpi/+/235563/
 - https://review.tizen.org/gerrit/#/c/platform/kernel/linux-rpi/+/235998/
            :

According to the support, this patch supports stability monitor 64 bit kernel driver.

Change-Id: Ie15a455a1eaf82579a69cce9106b324401d3cc69

CMakeLists.txt [new file with mode: 0644]
config/stability-monitor.conf [deleted file]
config/stability-monitor.conf.in [new file with mode: 0644]
packaging/stability-monitor-kmod-rpi3.spec

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644 (file)
index 0000000..efe644c
--- /dev/null
@@ -0,0 +1,3 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(stability-monitor C)
+CONFIGURE_FILE(config/${PROJECT_NAME}.conf.in config/${PROJECT_NAME}.conf @ONLY)
diff --git a/config/stability-monitor.conf b/config/stability-monitor.conf
deleted file mode 100644 (file)
index 63aa57c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-install proc_tsm insmod /usr/lib/stability-monitor/`/usr/bin/uname -r`/extra/proc-tsm.ko blacklist=System::TEF
diff --git a/config/stability-monitor.conf.in b/config/stability-monitor.conf.in
new file mode 100644 (file)
index 0000000..f60a11e
--- /dev/null
@@ -0,0 +1 @@
+install proc_tsm insmod @LIBPATH@/stability-monitor/`/usr/bin/uname -r`/extra/proc-tsm.ko blacklist=System::TEF
index 1343185..f3a6a70 100644 (file)
@@ -1,5 +1,11 @@
 %define KMOD_PATH %{_libdir}/stability-monitor
 
+%ifarch aarch64
+%define buildarch arm64
+%else
+%define buildarch arm
+%endif
+
 Name:       stability-monitor-kmod-rpi3
 Version:    6.2.1
 Release:    0
@@ -8,12 +14,13 @@ Source0:    %{name}-%{version}.tar.xz
 Source1:    %{name}.manifest
 Summary:    Stability monitoring kernel module
 Group:      System/Monitoring
-ExclusiveArch: armv7l
+BuildRequires: cmake
 BuildRequires: module-init-tools
-BuildRequires: arm-rpi3-linux-kernel-devel
-BuildRequires: arm-rpi4-linux-kernel-devel
+BuildRequires: %{buildarch}-rpi3-linux-kernel-devel
+BuildRequires: %{buildarch}-rpi4-linux-kernel-devel
 Provides:   stability-monitor-kernel-module
 
+
 %description
 This package provides kernel module for stability monitoring daemon.
 
@@ -22,13 +29,16 @@ This package provides kernel module for stability monitoring daemon.
 cp %{SOURCE1} ./%{name}.manifest
 
 %build
-make -C kernel clean KERNELDIR=/boot/kernel/devel/kernel-devel-arm-rpi3
-make -C kernel KERNELDIR=/boot/kernel/devel/kernel-devel-arm-rpi3/
-make -C kernel modules_install KERNELDIR=/boot/kernel/devel/kernel-devel-arm-rpi3 INSTALL_MOD_STRIP=1
+%cmake -DLIBPATH=%{_libdir}
+
+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
+
+make -C kernel clean KERNELDIR=/boot/kernel/devel/kernel-devel-%{buildarch}-rpi4
+make -C kernel KERNELDIR=/boot/kernel/devel/kernel-devel-%{buildarch}-rpi4
+make -C kernel modules_install KERNELDIR=/boot/kernel/devel/kernel-devel-%{buildarch}-rpi4 INSTALL_MOD_STRIP=1
 
-make -C kernel clean KERNELDIR=/boot/kernel/devel/kernel-devel-arm-rpi4
-make -C kernel KERNELDIR=/boot/kernel/devel/kernel-devel-arm-rpi4
-make -C kernel modules_install KERNELDIR=/boot/kernel/devel/kernel-devel-arm-rpi4 INSTALL_MOD_STRIP=1
 
 %install
 mkdir -p %{buildroot}/%{KMOD_PATH}
@@ -39,8 +49,8 @@ install -D config/stability-monitor.conf %{buildroot}/etc/modprobe.d/stability-m
 
 %clean
 rm -rf %{buildroot}
-make -C kernel clean KERNELDIR=/boot/kernel/devel/kernel-devel-arm-rpi3
-make -C kernel clean KERNELDIR=/boot/kernel/devel/kernel-devel-arm-rpi4
+make -C kernel clean KERNELDIR=/boot/kernel/devel/kernel-devel-%{buildarch}-rpi3
+make -C kernel clean KERNELDIR=/boot/kernel/devel/kernel-devel-%{buildarch}-rpi4
 rm -rf %{_builddir}/%{Name}-%{version}/lib
 
 %files