66 lines
1.5 KiB
RPMSpec
66 lines
1.5 KiB
RPMSpec
%global debug_package %{nil}
|
|
|
|
%define VERSION 5.10.0
|
|
%define RELEASE 1
|
|
|
|
Name: kata-micro-kernel
|
|
Version: %{VERSION}
|
|
Release: %{RELEASE}
|
|
Summary: Micro 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: automake gcc bc glibc-devel glibc-static glib2-devel glib2
|
|
BuildRequires: patch elfutils-libelf-devel bison flex
|
|
|
|
%description
|
|
This is a micro kernel for kata-containers.
|
|
|
|
%prep
|
|
%setup -T -c -a 0 -n kernel
|
|
%setup -T -c -a 1 -n kata_integration
|
|
|
|
# extract the kata_integration.tar.gz file
|
|
cd %{_builddir}/kata_integration
|
|
# apply kata_integration patches
|
|
sh apply-patches
|
|
|
|
# build kernel
|
|
cd %{_builddir}/kernel
|
|
mv kernel linux
|
|
cd %{_builddir}/kernel/linux/
|
|
%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/
|
|
make %{?_smp_mflags}
|
|
|
|
%install
|
|
mkdir -p -m 755 %{buildroot}/var/lib/kata
|
|
%ifarch %{ix86} x86_64
|
|
install -p -m 640 -D %{_builddir}/kernel/linux/arch/x86_64/boot/bzImage %{buildroot}/var/lib/kata/kernel
|
|
%else
|
|
install -p -m 640 -D %{_builddir}/kernel/linux/arch/arm64/boot/Image %{buildroot}/var/lib/kata/kernel
|
|
%endif
|
|
|
|
%clean
|
|
|
|
%files
|
|
/var/lib/kata/kernel
|
|
|
|
%doc
|
|
|
|
%changelog
|
|
* Fri Aug 20 2021 jikui<jikui2@huawei.com> - 5.10.0-1
|
|
- Type:requirement
|
|
- ID:NA
|
|
- SUG:NA
|
|
- DESC:init kata-micro-kernel package
|