2024-11-27 14:55:18 +03:00
|
|
|
%global debug_package %{nil}
|
|
|
|
%global _build_pkgcheck_set %nil
|
2024-11-27 15:05:50 +03:00
|
|
|
%global _build_pkgcheck_srpm %nil
|
2024-11-27 14:55:18 +03:00
|
|
|
%global _modulesdir /usr/lib/modules
|
2024-11-14 14:53:43 +03:00
|
|
|
|
|
|
|
Name: kernel-{BOARD_NAME}
|
|
|
|
Version: {KERNEL_VERSION}
|
|
|
|
Release: 1
|
|
|
|
Summary: kernel for {BOARD_NAME} devices
|
|
|
|
Group: System/Kernel and hardware
|
|
|
|
Source0: kernel.tar
|
2024-11-14 15:57:24 +03:00
|
|
|
# This line will be conditionally included or removed
|
|
|
|
{Source1}
|
2024-11-14 14:53:43 +03:00
|
|
|
License: GPLv2
|
|
|
|
Provides: kernel = %{EVRD}
|
|
|
|
|
|
|
|
%description
|
2024-11-14 15:57:24 +03:00
|
|
|
kernel for {BOARD_NAME}
|
2024-11-14 14:53:43 +03:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%autosetup -p1 -n kernel
|
2024-11-14 15:57:24 +03:00
|
|
|
|
|
|
|
# If Source1 is defined, include this line
|
|
|
|
{SOURCE1_COMMAND}
|
|
|
|
|
2024-11-14 14:53:43 +03:00
|
|
|
grep -Irl /lib/modules | xargs sed -i -e 's,/lib/modules,%{_modulesdir},g' -e 's,/usr/usr/lib/modules,/usr/lib/modules,g'
|
|
|
|
|
|
|
|
%build
|
2024-11-14 19:35:34 +03:00
|
|
|
{MAKE_DEFCONFIG}
|
2024-11-16 00:38:41 +03:00
|
|
|
%make_build -s CROSS_COMPILE=/usr/bin/{ARCH}-linux-gnu- ARCH={KERNEL_ARCH}
|
2024-11-14 14:53:43 +03:00
|
|
|
|
|
|
|
%install
|
|
|
|
# Install kernel modules, if any
|
|
|
|
make V=1 modules_install ARCH={KERNEL_ARCH} \
|
|
|
|
INSTALL_MOD_PATH=%{buildroot} \
|
2024-11-18 21:58:37 +03:00
|
|
|
INSTALL_DTBS_PATH=%{buildroot}/boot/dtbs
|
2024-11-14 14:53:43 +03:00
|
|
|
|
|
|
|
make dtbs_install ARCH={KERNEL_ARCH} \
|
|
|
|
INSTALL_MOD_PATH=%{buildroot} \
|
2024-11-19 23:35:14 +03:00
|
|
|
INSTALL_DTBS_PATH=%{buildroot}/boot/dtbs
|
2024-11-14 14:53:43 +03:00
|
|
|
|
|
|
|
cp arch/arm64/boot/Image %{buildroot}/boot/vmlinuz-%{version}
|
|
|
|
|
|
|
|
%files
|
|
|
|
/boot/*
|
2024-11-15 20:47:06 +03:00
|
|
|
%{_modulesdir}/*
|