From: Seung-Woo Kim Date: Thu, 6 Feb 2020 01:36:50 +0000 (+0900) Subject: packaging: Add kernel-headers package X-Git-Tag: submit/tizen/20220208.074352~173 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=86106e4b94f57d3a648312026fec31867ebb3f5b;p=platform%2Fkernel%2Flinux-rpi.git packaging: Add kernel-headers package For device related developement, user needs device kernel headers package. Add kernel-headers package for rpi4. Change-Id: I7970e02f2b10cae31e1d8899f460fc15a8bdf496 Signed-off-by: Seung-Woo Kim --- diff --git a/packaging/linux-rpi4.spec b/packaging/linux-rpi4.spec index ad90797d9036..f657cd1d3d03 100644 --- a/packaging/linux-rpi4.spec +++ b/packaging/linux-rpi4.spec @@ -58,6 +58,17 @@ Provides: %{variant}-kernel-devel-uname-r = %{fullVersion} %description -n %{variant}-linux-kernel-devel This package provides kernel map and etc information. +%package -n %{variant}-linux-kernel-headers +License: GPL-2.0 +Summary: Linux support headers for userspace development +Group: System/Kernel +Provides: kernel-headers-tizen-dev + +%description -n %{variant}-linux-kernel-headers +This package provides userspaces headers from the Linux kernel. These +headers are used by the installed headers for GNU glibc and other system + libraries. + %prep %setup -q -n linux-kernel-%{version} @@ -68,6 +79,12 @@ This package provides kernel map and etc information. # Make sure EXTRAVERSION says what we want it to say sed -i "s/^EXTRAVERSION.*/EXTRAVERSION = -%{variant}/" Makefile +# 0. extract uapi headers +mkdir -p uapi-headers/usr +make mrproper +make headers_check +make headers_install INSTALL_HDR_PATH=uapi-headers/usr + # 1-1. Set config file make %{config_name} @@ -101,7 +118,13 @@ install -m 644 rpi4/boot/bootcode.bin %{buildroot}/boot/ install -m 644 rpi4/boot/start*.elf %{buildroot}/boot/ install -m 644 rpi4/boot/fixup*.dat %{buildroot}/boot/ +# 2-5. Install uapi headers +find uapi-headers/usr/include -name ".install" -delete +find uapi-headers/usr/include -name "..install.cmd" -delete +mv uapi-headers/usr %{buildroot} + # 3-1. remove unnecessary files to prepare for devel package +rm -rf uapi-headers find %{_builddir}/linux-kernel-%{version} -name ".tmp_vmlinux*" -delete find %{_builddir}/linux-kernel-%{version} -name ".gitignore" -delete find %{_builddir}/linux-kernel-%{version} -name "\.*dtb*tmp" -delete @@ -128,6 +151,7 @@ mv %{_builddir}/kernel-devel-%{variant} %{buildroot}/boot/kernel/devel/ %clean rm -rf %{buildroot} +rm -rf %{_builddir}/usr %files -n %{variant}-linux-kernel-modules /lib/modules/* @@ -144,3 +168,6 @@ rm -rf %{buildroot} /boot/bootcode.bin /boot/start*.elf /boot/fixup*.dat + +%files -n %{variant}-linux-kernel-headers +/usr/include/*