add kata-micro-kernel.spec
kata_integration: add kata-micro-kernel.spec reason: add kata-micro-kernel.spec, it build a micro kernel for kata-containers Signed-off-by: yangfeiyu <yangfeiyu2@huawei.com>
This commit is contained in:
parent
6b95e8e3dc
commit
370dba2717
69
kata-micro-kernel.spec
Normal file
69
kata-micro-kernel.spec
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
%global debug_package %{nil}
|
||||||
|
%global TarballVer 4.19.138
|
||||||
|
|
||||||
|
%define VERSION 4.19.138
|
||||||
|
%define RELEASE 1
|
||||||
|
|
||||||
|
%define with_patch 0
|
||||||
|
%define with_source 1
|
||||||
|
|
||||||
|
Name: kata-micro-kernel
|
||||||
|
Version: %{VERSION}
|
||||||
|
Release: %{RELEASE}
|
||||||
|
Summary: Micro Linux Kernel For Kata-containers
|
||||||
|
License: GPLv2
|
||||||
|
URL: http://www.kernel.org/
|
||||||
|
Source0: kernel.tar.gz
|
||||||
|
Source1: kata_integration-v1.0.0.tar.gz
|
||||||
|
|
||||||
|
BuildRoot: %_topdir/BUILDROOT
|
||||||
|
BuildRequires: patch bash perl automake make gcc binutils hostname bc openssl-devel glibc-devel glibc-static
|
||||||
|
BuildRequires: ncurses-devel elfutils-devel elfutils-libelf-devel elfutils binutils-devel bison flex
|
||||||
|
|
||||||
|
%description
|
||||||
|
This kernel is customed as kata-containers guest kernel, which is core of the kata-containers.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -c -a 0 -n kernel
|
||||||
|
%setup -q -c -a 1 -n kata_integration
|
||||||
|
|
||||||
|
# extract the kata_integration.tar.gz file
|
||||||
|
cd %{_builddir}/kata_integration
|
||||||
|
tar -xzf kata_integration-v1.0.0.tar.gz
|
||||||
|
|
||||||
|
# build kernel
|
||||||
|
cd %{_builddir}/kernel
|
||||||
|
mv kernel linux-%{version}
|
||||||
|
cd %{_builddir}/kernel/linux-%{version}
|
||||||
|
|
||||||
|
%ifarch %{ix86} x86_64
|
||||||
|
cp %{_builddir}/kata_integration/hack/config-kata-x86_64 ./.config
|
||||||
|
%else
|
||||||
|
cp %{_builddir}/kata_integration/hack/config-kata-arm64 ./.config
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%build
|
||||||
|
cd %{_builddir}/kernel/linux-%{version}
|
||||||
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p -m 755 %{buildroot}/var/lib/kata
|
||||||
|
%ifarch %{ix86} x86_64
|
||||||
|
install -p -m 755 -D %{_builddir}/kernel/linux-%{version}/arch/x86_64/boot/bzImage %{buildroot}/var/lib/kata/kernel
|
||||||
|
%else
|
||||||
|
install -p -m 755 -D %{_builddir}/kernel/linux-%{version}/arch/arm64/boot/Image %{buildroot}/var/lib/kata/kernel
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%clean
|
||||||
|
|
||||||
|
%files
|
||||||
|
/var/lib/kata/kernel
|
||||||
|
|
||||||
|
%doc
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Thu Aug 27 2020 jiangpengfei<jiangpengfei9@huawei.com> - 4.19.138-1
|
||||||
|
- Type:enhancement
|
||||||
|
- ID:NA
|
||||||
|
- SUG:restart
|
||||||
|
- DESC:init kata-micro-kernel package
|
||||||
Loading…
x
Reference in New Issue
Block a user