!10 adapt kernel source path and name
Merge pull request !10 from pengyq/master
This commit is contained in:
commit
29e99d36a7
@ -3,7 +3,7 @@
|
|||||||
Name: kpatch
|
Name: kpatch
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: %{raw_version}
|
Version: %{raw_version}
|
||||||
Release: 2
|
Release: 3
|
||||||
Summary: A Linux dynamic kernel patching infrastructure
|
Summary: A Linux dynamic kernel patching infrastructure
|
||||||
|
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
@ -95,6 +95,12 @@ popd
|
|||||||
%{_mandir}/man1/*.1.gz
|
%{_mandir}/man1/*.1.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Aug 29 2020 Yeqing Peng<pengyeqing@huawei.com> -1:0.9.1-3
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:adapt kernel source path and name
|
||||||
|
|
||||||
* Wed Apr 22 2020 Zhipeng Xie<xiezhipeng1@huawei.com> -1:0.9.1-2
|
* Wed Apr 22 2020 Zhipeng Xie<xiezhipeng1@huawei.com> -1:0.9.1-2
|
||||||
- Type:bugfix
|
- Type:bugfix
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
@ -690,24 +690,28 @@ function fn_main()
|
|||||||
|
|
||||||
function fn_prepare()
|
function fn_prepare()
|
||||||
{
|
{
|
||||||
|
local src_dir=""
|
||||||
kerver=`uname -r`
|
kerver=`uname -r`
|
||||||
kerver=${kerver%.x86_64}
|
if [ ! -d /usr/src/linux-$kerver ];then
|
||||||
kerver=${kerver%.aarch64}
|
kerver=${kerver%.x86_64}
|
||||||
|
kerver=${kerver%.aarch64}
|
||||||
|
src_dir="kernels"
|
||||||
|
fi
|
||||||
echo kernel version:$kerver
|
echo kernel version:$kerver
|
||||||
if [ ! -L kernel-source ];then
|
if [ ! -L kernel-source ];then
|
||||||
if [ -d /arm/arm_kernel ];then
|
if [ -d /arm/arm_kernel ];then
|
||||||
ln -s /arm/arm_kernel/linux-$kerver kernel-source
|
ln -s /arm/arm_kernel/linux-$kerver kernel-source
|
||||||
else
|
else
|
||||||
ln -s /usr/src/kernels/linux-$kerver kernel-source
|
ln -s /usr/src/$src_dir/linux-$kerver kernel-source
|
||||||
cp /lib/modules/`uname -r`/build/Makefile /usr/src/kernels/linux-$kerver
|
cp /lib/modules/`uname -r`/build/Makefile /usr/src/$src_dir/linux-$kerver
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ ! -L .config ];then
|
if [ ! -L .config ];then
|
||||||
if [ -d /arm/arm_kernel ];then
|
if [ -d /arm/arm_kernel ];then
|
||||||
ln -s /arm/arm_kernel/linux-$kerver/.config .config
|
ln -s /arm/arm_kernel/linux-$kerver/.config .config
|
||||||
else
|
else
|
||||||
ln -s /usr/src/kernels/linux-$kerver/.config .config
|
ln -s /usr/src/$src_dir/linux-$kerver/.config .config
|
||||||
cp /lib/modules/`uname -r`/build/.config /usr/src/kernels/linux-$kerver
|
cp /lib/modules/`uname -r`/build/.config /usr/src/$src_dir/linux-$kerver
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
rm -rf $G_KPATCH_FLAGS
|
rm -rf $G_KPATCH_FLAGS
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user