prefetch_tuning: Fix the prefetch_tuning.ko loading

This commit is contained in:
hanxinke 2020-08-06 17:10:14 +08:00 committed by Gitee
parent 25ca672c65
commit be20d971ca

View File

@ -3,7 +3,7 @@
Name : prefetch_tuning Name : prefetch_tuning
Summary : CPU prefetch tuning module for Kunpeng 920 Summary : CPU prefetch tuning module for Kunpeng 920
Version : 1.0 Version : 1.0
Release : 2 Release : 3
License : GPLv2 License : GPLv2
Source0 : %{kmod_name}-%{version}.tar.gz Source0 : %{kmod_name}-%{version}.tar.gz
buildroot : %{_tmppath}/%{kmod_name}-%{version}-build buildroot : %{_tmppath}/%{kmod_name}-%{version}-build
@ -26,8 +26,8 @@ sed -i 's/EXTRA_CFLAGS += -Wall -Werror/EXTRA_CFLAGS += -Wall/g' Makefile
%make_build %make_build
%install %install
mkdir -p %{buildroot}/lib/modules/EulerOS/%{kmod_name} mkdir -p %{buildroot}/lib/modules/%{kmod_name}
install -m 640 %{kmod_name}.ko %{buildroot}/lib/modules/EulerOS/%{kmod_name}/%{kmod_name}.ko install -m 640 %{kmod_name}.ko %{buildroot}/lib/modules/%{kmod_name}/%{kmod_name}.ko
%clean %clean
rm -rf %{buildroot} rm -rf %{buildroot}
@ -36,17 +36,21 @@ rm -rf %_builddir/%{kmod_name}-%{version}
%files %files
%license License/LICENSE %license License/LICENSE
%defattr(-,root,root) %defattr(-,root,root)
%dir /lib/modules/EulerOS/%{kmod_name} %dir /lib/modules/%{kmod_name}
%attr(0640,root,root) /lib/modules/EulerOS/%{kmod_name}/%{kmod_name}.ko %attr(0640,root,root) /lib/modules/%{kmod_name}/%{kmod_name}.ko
%pre %pre
%post %posttrans
depmod -a `uname -r` insmod /lib/modules/%{kmod_name}/%{kmod_name}.ko
%preun %preun
rmmod prefetch_tuning
%changelog %changelog
* Thu Aug 6 2020 hanxinke <hanxinke@huawei.com> - 1.0-3
- Fix the prefetch_tuning.ko loading
* Sat Feb 29 2020 openEuler Buildteam <buildteam@openeuler.org> - 1.0-2 * Sat Feb 29 2020 openEuler Buildteam <buildteam@openeuler.org> - 1.0-2
- Fix warning exception caused by compilation options - Fix warning exception caused by compilation options