merge kernel-*-modules into main kernel package; fix depmod after moving System.map away from /boot [release 5.4.51.20200902-2mamba;Sun Oct 04 2020]
This commit is contained in:
parent
90910dd10e
commit
c41bd0d00a
@ -5,5 +5,5 @@ The kernel package contains the Linux kernel (%{KIMAGE_DEST}), the operating sys
|
||||
The kernel handles the basic functions of the operating system: memory allocation, process allocation, device input and output, etc.
|
||||
This is the source package used to build kernel for different architectures and targets.
|
||||
|
||||
This kernel was build for %{_target_cpu} architecture and the following target: rpi-v7l.
|
||||
This kernel was build for %{_target_cpu} architecture and the following target: .
|
||||
|
||||
|
9122
kernel-rpi-v8-5.4-aarch64-config
Normal file
9122
kernel-rpi-v8-5.4-aarch64-config
Normal file
File diff suppressed because it is too large
Load Diff
158
kernel-rpi.spec
158
kernel-rpi.spec
@ -1,5 +1,5 @@
|
||||
# openmamba kernel specfile for embedded kernels
|
||||
# Copyright (C) 2011-2020 by Silvan Calarco
|
||||
# Copyright (C) 2011-2021 by Silvan Calarco
|
||||
#
|
||||
# To build a specific target:
|
||||
#
|
||||
@ -18,12 +18,13 @@
|
||||
%define kernel_majver %(echo %version | cut -d. -f1-2)
|
||||
%define gitdirver 1.%(echo %version | cut -d. -f4)
|
||||
|
||||
%ifarch aarch64
|
||||
%define KERNEL_TARGET rpi-v8
|
||||
%else
|
||||
%if "%{?KERNEL_TARGET}" == ""
|
||||
%define KERNEL_TARGET rpi-v7l
|
||||
%endif
|
||||
|
||||
# define short kernel target name for Lilo
|
||||
%define KERNEL_TARGET_SHORT %{KERNEL_TARGET}
|
||||
%endif
|
||||
|
||||
%if "%{_target_cpu}" == "arm"
|
||||
%define KIMAGE arch/arm/boot/zImage
|
||||
@ -32,12 +33,19 @@
|
||||
%define target_cpu %{_target_cpu}
|
||||
%endif
|
||||
|
||||
%if "%{_target_cpu}" == "aarch64"
|
||||
%define KIMAGE arch/arm64/boot/Image
|
||||
%define KIMAGE_DEST kernel
|
||||
%define DEPMOD /sbin/depmod
|
||||
%define target_cpu arm64
|
||||
%endif
|
||||
|
||||
# disable internal dependency generator for scriptlets
|
||||
%define _use_internal_dependency_generator 1
|
||||
|
||||
Name: kernel-rpi
|
||||
Version: 5.4.51.20200902
|
||||
Release: 1mamba
|
||||
Release: 2mamba
|
||||
Summary: The Linux Kernel, the operating system core itself for the RaspberryPI
|
||||
Group: System/Kernel and Hardware
|
||||
Vendor: openmamba
|
||||
@ -45,21 +53,25 @@ Distribution: openmamba
|
||||
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
URL: https://github.com/raspberrypi/linux
|
||||
Source0: git://github.com/raspberrypi/linux.git/raspberrypi-kernel_%{gitdirver}-1/linux-%{version}.tar.bz2
|
||||
#Source0: git://github.com/raspberrypi/linux.git/rpi-%{gitdirver}.y/linux-%{version}.tar.bz2
|
||||
Source20: kernel-rpi-logo.png
|
||||
Source100: %{name}-v7-%{kernel_majver}-arm-config
|
||||
Source101: %{name}-%{kernel_majver}-arm-config
|
||||
Source102: kernel-rpi-v7l-%{kernel_majver}-arm-config
|
||||
Source103: kernel-rpi-v8-%{kernel_majver}-aarch64-config
|
||||
License: GPL
|
||||
## AUTOBUILDREQ-BEGIN
|
||||
BuildRequires: glibc-devel
|
||||
BuildRequires: libperl
|
||||
BuildRequires: perl-devel
|
||||
## AUTOBUILDREQ-END
|
||||
BuildRequires: /bin/bash /bin/sh /usr/bin/perl
|
||||
BuildRequires: /bin/bash
|
||||
BuildRequires: /bin/sh
|
||||
BuildRequires: /usr/bin/perl
|
||||
BuildRequires: kmod
|
||||
BuildRequires: mkbootimg
|
||||
Provides: kernel-%{KERNEL_TARGET}-modules
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-modules
|
||||
Provides: kernel
|
||||
Provides: kernelmodules
|
||||
Requires(post): dracut
|
||||
Requires: linux_firmware
|
||||
Requires: raspberrypi-firmware
|
||||
@ -77,14 +89,19 @@ This kernel was build for %{_target_cpu} architecture and the following target:
|
||||
%package -n kernel-%{KERNEL_TARGET}
|
||||
Group: Development/Kernel
|
||||
Summary: The Linux Kernel, the operating system core itself for the RaspberryPI (%{KERNEL_TARGET})
|
||||
Provides: kernel-%{KERNEL_TARGET}-modules
|
||||
Obsoletes: kernel-%{KERNEL_TARGET}-modules
|
||||
%if "%{KERNEL_TARGET}" == "rpi-v7"
|
||||
Provides: kernel-rpi2
|
||||
Obsoletes: kernel-rpi2
|
||||
Provides: kernel-rpi2-modules
|
||||
Obsoletes: kernel-rpi2-modules
|
||||
%endif
|
||||
Provides: kernel
|
||||
Provides: kernelmodules
|
||||
Requires(post): dracut
|
||||
Requires: linux_firmware
|
||||
Requires: raspberrypi-firmware
|
||||
%endif
|
||||
|
||||
%description -n kernel-%{KERNEL_TARGET}
|
||||
The Linux Kernel, the operating system core itself for the Raspberry PI.
|
||||
@ -137,32 +154,6 @@ Obsoletes: kernel-rpi2-headers-sanitised
|
||||
Sanitised kernel headers used for glibc build.
|
||||
This kernel sanitised headers are configured for %{TARGET_CPU} architecture and the following target: %{?KERNEL_TARGET}.
|
||||
|
||||
%package -n kernel-%{KERNEL_TARGET}-modules
|
||||
Group: System/Kernel and Hardware
|
||||
Summary: The kernel base modules normally used by the device
|
||||
Requires: kernel-%{KERNEL_TARGET} == %{version}-%{release}
|
||||
Provides: kernelmodules
|
||||
%if "%{KERNEL_TARGET}" == "rpi-v7"
|
||||
Provides: kernel-rpi2-modules
|
||||
Obsoletes: kernel-rpi2-modules
|
||||
%endif
|
||||
|
||||
%description -n kernel-%{KERNEL_TARGET}-modules
|
||||
The kernel-modules package contains the base modules normally used by the device
|
||||
|
||||
%package -n kernel-%{KERNEL_TARGET}-modules-extra
|
||||
Group: System/Kernel and Hardware
|
||||
Summary: The kernel extra modules not normally used by the device
|
||||
Requires: kernel-%{KERNEL_TARGET} == %{version}-%{release}
|
||||
Provides: kernelmodulesextra
|
||||
%if "%{KERNEL_TARGET}" == "rpi-v7"
|
||||
Provides: kernel-rpi2-modules-extra
|
||||
Obsoletes: kernel-rpi2-modules-extra
|
||||
%endif
|
||||
|
||||
%description -n kernel-%{KERNEL_TARGET}-modules-extra
|
||||
The kernel-modules-extra package contains extra modules not normally used by the device.
|
||||
|
||||
%package -n kernel-%{KERNEL_TARGET}-firmware
|
||||
Group: System/Kernel and Hardware
|
||||
Summary: Firmware files used by %{name}
|
||||
@ -177,6 +168,14 @@ Obsoletes: kernel-rpi2-firmware
|
||||
%description -n kernel-%{KERNEL_TARGET}-firmware
|
||||
Firmware files used by the Linux Kernel.
|
||||
|
||||
%package -n kernel-%{KERNEL_TARGET}-dtbs
|
||||
Group: System/Kernel and Hardware
|
||||
Summary: Device Tree blobs provided with %{name}
|
||||
Requires: kernel-%{KERNEL_TARGET} == %{version}-%{release}
|
||||
|
||||
%description -n kernel-%{KERNEL_TARGET}-dtbs
|
||||
Device Tree blobs provided with %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n linux-%{version}
|
||||
#-D -T
|
||||
@ -204,6 +203,11 @@ make mrproper
|
||||
rpi-v7l) kernel_cfg=%{SOURCE102} ;;
|
||||
esac
|
||||
%endif
|
||||
%if %{_target_cpu} == aarch64
|
||||
case %{?KERNEL_TARGET} in
|
||||
rpi-v8) kernel_cfg=%{SOURCE103} ;;
|
||||
esac
|
||||
%endif
|
||||
cp $kernel_cfg ./.config
|
||||
|
||||
cp Makefile Makefile.orig
|
||||
@ -219,7 +223,7 @@ pngtopnm %{SOURCE20} | ppmquant -plain 224 > drivers/video/logo/logo_linux_clut2
|
||||
#
|
||||
ARCH=%{target_cpu} make oldconfig
|
||||
ARCH=%{target_cpu} make CROSS_COMPILE=%{_target_platform}- %{?_smp_mflags}
|
||||
ARCH=%{target_cpu} make CROSS_COMPILE=%{_target_platform}- %{?_smp_mflags} dtbs
|
||||
ARCH=%{target_cpu} make CROSS_COMPILE=%{_target_platform}- %{?_smp_mflags} modules dtbs
|
||||
|
||||
%install
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
@ -244,14 +248,19 @@ rm -f build && ln -sf /usr/src/linux-%{kernel_ver}-%{?KERNEL_TARGET} build )
|
||||
esac
|
||||
%endif
|
||||
|
||||
%if %{_target_cpu} == aarch64
|
||||
case %{?KERNEL_TARGET} in
|
||||
rpi-v8) kimage_dest="kernel8.img" ;;
|
||||
esac
|
||||
%endif
|
||||
|
||||
cp %{KIMAGE} %{buildroot}/boot/${kimage_dest}
|
||||
#cp System.map %{buildroot}/boot/System.map-%{kernel_ver}-%{?KERNEL_TARGET}
|
||||
cp System.map %{buildroot}/lib/modules/%{kernel_ver}-%{?KERNEL_TARGET}/System.map
|
||||
|
||||
# install dtbs
|
||||
#cp arch/arm/boot/dts/*.dtb %{buildroot}/boot/
|
||||
#install -d -m0755 %{buildroot}/boot/overlays/
|
||||
#cp arch/arm/boot/dts/overlays/*.dtb* %{buildroot}/boot/overlays/
|
||||
#cp arch/arm/boot/dts/overlays/README %{buildroot}/boot/overlays/
|
||||
install -d -m0755 %{buildroot}/boot/overlays/
|
||||
#cp arch/%{target_cpu}/boot/dts/*.dtb %{buildroot}/boot/
|
||||
cp arch/arm/boot/dts/overlays/*.dtb* %{buildroot}/boot/overlays/
|
||||
|
||||
# recreate kernel sources
|
||||
[ -e kernel-headers.files ] && rm -f kernel-headers.files
|
||||
@ -268,6 +277,12 @@ ARCH=%{target_cpu} make mrproper
|
||||
esac
|
||||
%endif
|
||||
|
||||
%if %{_target_cpu} == aarch64
|
||||
case %{?KERNEL_TARGET} in
|
||||
rpi-v8) kernel_cfg=%{SOURCE103} ;;
|
||||
esac
|
||||
%endif
|
||||
|
||||
cp $kernel_cfg %{buildroot}/usr/src/linux-%{kernel_ver}-%{?KERNEL_TARGET}/.config
|
||||
cp %{_builddir}/linux-%{version}/Module.symvers %{buildroot}/usr/src/linux-%{kernel_ver}-%{?KERNEL_TARGET}
|
||||
ARCH=%{target_cpu} make oldconfig
|
||||
@ -301,9 +316,8 @@ cd %{buildroot}%{_prefix}/src/linux-%{kernel_ver}-%{?KERNEL_TARGET}
|
||||
|
||||
splitdirs="block crypto drivers fs ipc kernel lib mm net security sound"
|
||||
case %{_target_cpu} in
|
||||
i586|x86_64) headers_arch="x86" ;;
|
||||
arm) headers_arch="arm" ;;
|
||||
ppc) headers_arch="ppc" ;;
|
||||
aarch64) headers_arch="arm64" ;;
|
||||
esac
|
||||
|
||||
find $splitdirs -name *.h -exec \
|
||||
@ -356,15 +370,11 @@ rm -rf %{buildroot}%{_prefix}/src/linux-%{kernel_ver}-%{KERNEL_TARGET}/.github
|
||||
%post -n kernel-%{KERNEL_TARGET}
|
||||
# new install or upgrade
|
||||
if [ $1 -ge 1 ]; then
|
||||
/sbin/depmod -A -F /boot/System.map-%{kernel_ver}-%{?KERNEL_TARGET} \
|
||||
/sbin/depmod -A -F /lib/modules/%{kernel_ver}-%{?KERNEL_TARGET}/System.map \
|
||||
%{kernel_ver}-%{?KERNEL_TARGET} &>/dev/null
|
||||
mkinitrd -f /boot/initramfs-%{kernel_ver}-%{?KERNEL_TARGET}.img %{kernel_ver}-%{?KERNEL_TARGET}
|
||||
#mkinitrd -f /boot/initramfs-%{kernel_ver}-%{?KERNEL_TARGET}.img %{kernel_ver}-%{?KERNEL_TARGET}
|
||||
fi
|
||||
#[ -e /dev/mtd3 ] && {
|
||||
# flash_eraseall /dev/mtd3
|
||||
# cat /boot/%{KIMAGE_DEST}-%{kernel_ver}-%{?KERNEL_TARGET} > /dev/mtd3
|
||||
#}
|
||||
exit 0
|
||||
:
|
||||
|
||||
%postun -n kernel-%{KERNEL_TARGET}
|
||||
# erase this package
|
||||
@ -372,36 +382,30 @@ if [ $1 -eq 0 ]; then
|
||||
[ -f /boot/%{KIMAGE_DEST}-%{kernel_ver}-%{?KERNEL_TARGET} ] ||
|
||||
rm -f /boot/initramfs-%{kernel_ver}-%{?KERNEL_TARGET}.img
|
||||
fi
|
||||
exit 0
|
||||
:
|
||||
|
||||
%post -n kernel-%{KERNEL_TARGET}-headers
|
||||
# touch file so it results up-to-date on make
|
||||
touch %{_prefix}/src/linux-%{kernel_ver}-%{?KERNEL_TARGET}/include/config/MARKER
|
||||
exit 0
|
||||
|
||||
%post -n kernel-%{KERNEL_TARGET}-modules
|
||||
# new install or upgrade
|
||||
if [ $1 -ge 1 ]; then
|
||||
/sbin/depmod -A -F /boot/System.map-%{kernel_ver}-%{?KERNEL_TARGET} \
|
||||
%{kernel_ver}-%{?KERNEL_TARGET} &>/dev/null
|
||||
fi
|
||||
exit 0
|
||||
|
||||
%post -n kernel-%{KERNEL_TARGET}-modules-extra
|
||||
# new install or upgrade
|
||||
if [ $1 -ge 1 ]; then
|
||||
/sbin/depmod -A -F /boot/System.map-%{kernel_ver}-%{?KERNEL_TARGET} \
|
||||
%{kernel_ver}-%{?KERNEL_TARGET} &>/dev/null
|
||||
fi
|
||||
exit 0
|
||||
:
|
||||
|
||||
%files -n kernel-%{KERNEL_TARGET}
|
||||
%defattr (-, root, root)
|
||||
#/boot/System.map-%{kernel_ver}-%{?KERNEL_TARGET}
|
||||
/boot/kernel*.img
|
||||
%dir /lib/modules/%{kernel_ver}-%{?KERNEL_TARGET}
|
||||
/lib/modules/%{kernel_ver}-%{?KERNEL_TARGET}/System.map
|
||||
/lib/modules/%{kernel_ver}-%{?KERNEL_TARGET}/modules.builtin
|
||||
/lib/modules/%{kernel_ver}-%{?KERNEL_TARGET}/modules.builtin.bin
|
||||
/lib/modules/%{kernel_ver}-%{?KERNEL_TARGET}/modules.builtin.alias.bin
|
||||
/lib/modules/%{kernel_ver}-%{?KERNEL_TARGET}/modules.builtin.modinfo
|
||||
/lib/modules/%{kernel_ver}-%{?KERNEL_TARGET}/modules.order
|
||||
%dir /lib/modules/%{kernel_ver}-%{?KERNEL_TARGET}/kernel
|
||||
/lib/modules/%{kernel_ver}-%{?KERNEL_TARGET}/kernel/*
|
||||
|
||||
%files -n kernel-%{KERNEL_TARGET}-dtbs
|
||||
%defattr (-, root, root)
|
||||
#/boot/*.dtb*
|
||||
#/boot/overlays/*.dtb*
|
||||
/boot/overlays/*.dtb*
|
||||
|
||||
%files -n kernel-%{KERNEL_TARGET}-source
|
||||
#-f kernel-source.files
|
||||
@ -451,23 +455,15 @@ exit 0
|
||||
/lib/modules/%{kernel_ver}-%{?KERNEL_TARGET}/build
|
||||
/lib/modules/%{kernel_ver}-%{?KERNEL_TARGET}/source
|
||||
|
||||
%files -n kernel-%{KERNEL_TARGET}-modules
|
||||
%defattr (-, root, root)
|
||||
%dir /lib/modules/%{kernel_ver}-%{?KERNEL_TARGET}
|
||||
/lib/modules/%{kernel_ver}-%{?KERNEL_TARGET}/modules.builtin
|
||||
/lib/modules/%{kernel_ver}-%{?KERNEL_TARGET}/modules.builtin.bin
|
||||
/lib/modules/%{kernel_ver}-%{?KERNEL_TARGET}/modules.builtin.alias.bin
|
||||
/lib/modules/%{kernel_ver}-%{?KERNEL_TARGET}/modules.builtin.modinfo
|
||||
/lib/modules/%{kernel_ver}-%{?KERNEL_TARGET}/modules.order
|
||||
%dir /lib/modules/%{kernel_ver}-%{?KERNEL_TARGET}/kernel
|
||||
/lib/modules/%{kernel_ver}-%{?KERNEL_TARGET}/kernel/*
|
||||
|
||||
#%files -n kernel-%{KERNEL_TARGET}-firmware
|
||||
#%defattr (-, root, root)
|
||||
#%dir /lib/firmware
|
||||
#/lib/firmware/*
|
||||
|
||||
%changelog
|
||||
* Sun Oct 04 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 5.4.51.20200902-2mamba
|
||||
- merge kernel-*-modules into main kernel package; fix depmod after moving System.map away from /boot
|
||||
|
||||
* Thu Oct 01 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 5.4.51.20200902-1mamba
|
||||
- update to 5.4.51.20200902
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user