500 |
|
|
501 |
# Build the kernel |
# Build the kernel |
502 |
%kmake -s all |
%kmake -s all |
|
%ifarch %{arm} |
|
|
%kmake uImage |
|
|
%endif |
|
503 |
# Install kernel |
# Install kernel |
504 |
install -d %{temp_boot} |
install -d %{temp_boot} |
505 |
install -m 644 System.map %{temp_boot}/System.map-%{buildrel} |
install -m 644 System.map %{temp_boot}/System.map-%{buildrel} |
506 |
install -m 644 .config %{temp_boot}/config-%{buildrel} |
install -m 644 .config %{temp_boot}/config-%{buildrel} |
507 |
%ifarch %{arm} |
%ifarch %{arm} |
508 |
cp -f arch/%{target_arch}/boot/uImage %{temp_boot}/uImage-$KernelVer |
cp -f arch/arm/boot/zImage %{temp_boot}/vmlinuz-%{buildrel} |
509 |
|
install -d %{temp_root}/usr/lib/linux-%{buildrel}/ |
510 |
|
for d in arch/arm/boot/dts/*.dtb; do \ |
511 |
|
install -D -m644 $d %{temp_root}/usr/lib/linux-%{buildrel}/$(basename $d); \ |
512 |
|
done |
513 |
%else |
%else |
514 |
cp -f arch/%{target_arch}/boot/bzImage %{temp_boot}/vmlinuz-%{buildrel} |
cp -f arch/%{target_arch}/boot/bzImage %{temp_boot}/vmlinuz-%{buildrel} |
515 |
%endif |
%endif |
623 |
%endif |
%endif |
624 |
done |
done |
625 |
%ifnarch %{arm} |
%ifnarch %{arm} |
626 |
|
rm -rf %{target_source}/arch/arm* |
627 |
rm -rf %{target_source}/include/kvm/arm* |
rm -rf %{target_source}/include/kvm/arm* |
628 |
|
rm -rf %{target_source}/include/soc |
629 |
|
rm -rf %{target_source}/tools/arch/arm* |
630 |
%endif |
%endif |
631 |
|
|
632 |
# remove arch files based on target arch in -devel rpms |
# remove arch files based on target arch in -devel rpms |
638 |
rm -rf %{target_devel}/arch/arm |
rm -rf %{target_devel}/arch/arm |
639 |
rm -rf %{target_devel}/arch/arm64 |
rm -rf %{target_devel}/arch/arm64 |
640 |
rm -rf %{target_devel}/include/kvm/arm* |
rm -rf %{target_devel}/include/kvm/arm* |
641 |
rm -rf %{target_devel}/include/soc/tegra |
rm -rf %{target_devel}/include/soc |
642 |
%endif |
%endif |
643 |
%endif |
%endif |
644 |
|
|
779 |
%if %build_kernel |
%if %build_kernel |
780 |
%files -n %{kname}-%{buildrel} |
%files -n %{kname}-%{buildrel} |
781 |
%{_bootdir}/config-%{buildrel} |
%{_bootdir}/config-%{buildrel} |
|
%ifarch %{arm} |
|
|
%{_bootdir}/uImage-%{buildrel} |
|
|
%else |
|
782 |
%{_bootdir}/vmlinuz-%{buildrel} |
%{_bootdir}/vmlinuz-%{buildrel} |
|
%endif |
|
783 |
%{_bootdir}/System.map-%{buildrel} |
%{_bootdir}/System.map-%{buildrel} |
784 |
%dir %{_modulesdir}/%{buildrel}/ |
%dir %{_modulesdir}/%{buildrel}/ |
785 |
%{_modulesdir}/%{buildrel}/kernel |
%{_modulesdir}/%{buildrel}/kernel |
786 |
%{_modulesdir}/%{buildrel}/modules.* |
%{_modulesdir}/%{buildrel}/modules.* |
787 |
%doc README.kernel-sources |
%doc README.kernel-sources |
788 |
|
%ifarch %arm |
789 |
|
%dir /usr/lib/linux-%{buildrel} |
790 |
|
/usr/lib/linux-%{buildrel}/*.dtb |
791 |
|
%endif |
792 |
%endif # build_kernel |
%endif # build_kernel |
793 |
|
|
794 |
# kernel-source |
# kernel-source |