Add support for RISC-V (riscv64)
This is an attempt to move from v5.10 - v5.14 and later to v5.15 using kernel-ark. Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
This commit is contained in:
parent
50ad15a0dc
commit
d491ffb2b7
|
@ -0,0 +1,12 @@
|
||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
# This is the riscv64 override file for the core/drivers package split. The
|
||||||
|
# module directories listed here and in the generic list in filter-modules.sh
|
||||||
|
# will be moved to the resulting kernel-modules package for this arch.
|
||||||
|
# Anything not listed in those files will be in the kernel-core package.
|
||||||
|
#
|
||||||
|
# Please review the default list in filter-modules.sh before making
|
||||||
|
# modifications to the overrides below. If something should be removed across
|
||||||
|
# all arches, remove it in the default instead of per-arch.
|
||||||
|
|
||||||
|
driverdirs="atm auxdisplay bcma bluetooth firewire fpga infiniband leds media memstick message mtd nfc ntb pcmcia power ssb soundwire staging tty uio w1"
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
27
kernel.spec
27
kernel.spec
|
@ -131,7 +131,7 @@ Summary: The Linux kernel
|
||||||
%define patchlevel 14
|
%define patchlevel 14
|
||||||
|
|
||||||
# allow pkg_release to have configurable %%{?dist} tag
|
# allow pkg_release to have configurable %%{?dist} tag
|
||||||
%define specrelease 101%{?buildid}%{?dist}
|
%define specrelease 101%{?buildid}.0.riscv64%{?dist}
|
||||||
|
|
||||||
%define pkg_release %{specrelease}
|
%define pkg_release %{specrelease}
|
||||||
|
|
||||||
|
@ -466,6 +466,14 @@ Summary: The Linux kernel
|
||||||
%define kernel_image arch/arm64/boot/Image.gz
|
%define kernel_image arch/arm64/boot/Image.gz
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%ifarch riscv64
|
||||||
|
%define all_arch_configs kernel-%{version}-riscv64*.config
|
||||||
|
%define asmarch riscv
|
||||||
|
%define hdrarch riscv
|
||||||
|
%define make_target Image.gz
|
||||||
|
%define kernel_image arch/riscv/boot/Image.gz
|
||||||
|
%endif
|
||||||
|
|
||||||
# Should make listnewconfig fail if there's config options
|
# Should make listnewconfig fail if there's config options
|
||||||
# printed out?
|
# printed out?
|
||||||
%if %{nopatches}
|
%if %{nopatches}
|
||||||
|
@ -547,7 +555,7 @@ Release: %{pkg_release}
|
||||||
# DO NOT CHANGE THE 'ExclusiveArch' LINE TO TEMPORARILY EXCLUDE AN ARCHITECTURE BUILD.
|
# DO NOT CHANGE THE 'ExclusiveArch' LINE TO TEMPORARILY EXCLUDE AN ARCHITECTURE BUILD.
|
||||||
# SET %%nobuildarches (ABOVE) INSTEAD
|
# SET %%nobuildarches (ABOVE) INSTEAD
|
||||||
%if 0%{?fedora}
|
%if 0%{?fedora}
|
||||||
ExclusiveArch: noarch x86_64 s390x %{arm} aarch64 ppc64le
|
ExclusiveArch: noarch x86_64 s390x %{arm} aarch64 ppc64le riscv64
|
||||||
%else
|
%else
|
||||||
ExclusiveArch: noarch i386 i686 x86_64 s390x %{arm} aarch64 ppc64le
|
ExclusiveArch: noarch i386 i686 x86_64 s390x %{arm} aarch64 ppc64le
|
||||||
%endif
|
%endif
|
||||||
|
@ -745,6 +753,7 @@ Source83: filter-aarch64.sh.fedora
|
||||||
Source86: filter-ppc64le.sh.fedora
|
Source86: filter-ppc64le.sh.fedora
|
||||||
Source87: filter-s390x.sh.fedora
|
Source87: filter-s390x.sh.fedora
|
||||||
Source89: filter-modules.sh.fedora
|
Source89: filter-modules.sh.fedora
|
||||||
|
Source7000: filter-riscv64.sh.fedora
|
||||||
|
|
||||||
Source90: filter-x86_64.sh.rhel
|
Source90: filter-x86_64.sh.rhel
|
||||||
Source91: filter-armv7hl.sh.rhel
|
Source91: filter-armv7hl.sh.rhel
|
||||||
|
@ -779,6 +788,8 @@ Source47: kernel-s390x-fedora.config
|
||||||
Source48: kernel-s390x-debug-fedora.config
|
Source48: kernel-s390x-debug-fedora.config
|
||||||
Source49: kernel-x86_64-fedora.config
|
Source49: kernel-x86_64-fedora.config
|
||||||
Source50: kernel-x86_64-debug-fedora.config
|
Source50: kernel-x86_64-debug-fedora.config
|
||||||
|
Source7001: kernel-riscv64-fedora.config
|
||||||
|
Source7002: kernel-riscv64-debug-fedora.config
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -799,11 +810,13 @@ Source201: Module.kabi_aarch64
|
||||||
Source202: Module.kabi_ppc64le
|
Source202: Module.kabi_ppc64le
|
||||||
Source203: Module.kabi_s390x
|
Source203: Module.kabi_s390x
|
||||||
Source204: Module.kabi_x86_64
|
Source204: Module.kabi_x86_64
|
||||||
|
Source205: Module.kabi_riscv64
|
||||||
|
|
||||||
Source210: Module.kabi_dup_aarch64
|
Source210: Module.kabi_dup_aarch64
|
||||||
Source211: Module.kabi_dup_ppc64le
|
Source211: Module.kabi_dup_ppc64le
|
||||||
Source212: Module.kabi_dup_s390x
|
Source212: Module.kabi_dup_s390x
|
||||||
Source213: Module.kabi_dup_x86_64
|
Source213: Module.kabi_dup_x86_64
|
||||||
|
Source214: Module.kabi_dup_riscv64
|
||||||
|
|
||||||
Source300: kernel-abi-stablelists-%{rpmversion}-%{distro_build}.tar.bz2
|
Source300: kernel-abi-stablelists-%{rpmversion}-%{distro_build}.tar.bz2
|
||||||
Source301: kernel-kabi-dw-%{rpmversion}-%{distro_build}.tar.bz2
|
Source301: kernel-kabi-dw-%{rpmversion}-%{distro_build}.tar.bz2
|
||||||
|
@ -1589,7 +1602,7 @@ BuildKernel() {
|
||||||
mkdir -p $RPM_BUILD_ROOT%{debuginfodir}/%{image_install_path}
|
mkdir -p $RPM_BUILD_ROOT%{debuginfodir}/%{image_install_path}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%ifarch %{arm} aarch64
|
%ifarch %{arm} aarch64 riscv64
|
||||||
%{make} ARCH=$Arch dtbs INSTALL_DTBS_PATH=$RPM_BUILD_ROOT/%{image_install_path}/dtb-$KernelVer
|
%{make} ARCH=$Arch dtbs INSTALL_DTBS_PATH=$RPM_BUILD_ROOT/%{image_install_path}/dtb-$KernelVer
|
||||||
%{make} ARCH=$Arch dtbs_install INSTALL_DTBS_PATH=$RPM_BUILD_ROOT/%{image_install_path}/dtb-$KernelVer
|
%{make} ARCH=$Arch dtbs_install INSTALL_DTBS_PATH=$RPM_BUILD_ROOT/%{image_install_path}/dtb-$KernelVer
|
||||||
cp -r $RPM_BUILD_ROOT/%{image_install_path}/dtb-$KernelVer $RPM_BUILD_ROOT/lib/modules/$KernelVer/dtb
|
cp -r $RPM_BUILD_ROOT/%{image_install_path}/dtb-$KernelVer $RPM_BUILD_ROOT/lib/modules/$KernelVer/dtb
|
||||||
|
@ -2377,7 +2390,7 @@ find $RPM_BUILD_ROOT/usr/include \
|
||||||
|
|
||||||
%if %{with_cross_headers}
|
%if %{with_cross_headers}
|
||||||
%if 0%{?fedora}
|
%if 0%{?fedora}
|
||||||
HDR_ARCH_LIST='arm arm64 powerpc s390 x86'
|
HDR_ARCH_LIST='arm arm64 powerpc s390 x86 riscv64'
|
||||||
%else
|
%else
|
||||||
HDR_ARCH_LIST='arm64 powerpc s390 x86'
|
HDR_ARCH_LIST='arm64 powerpc s390 x86'
|
||||||
%endif
|
%endif
|
||||||
|
@ -2732,7 +2745,7 @@ fi
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with_kabidw_base}
|
%if %{with_kabidw_base}
|
||||||
%ifarch x86_64 s390x ppc64 ppc64le aarch64
|
%ifarch x86_64 s390x ppc64 ppc64le aarch64 riscv64
|
||||||
%files kernel-kabidw-base-internal
|
%files kernel-kabidw-base-internal
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
/kabidw-base/%{_target_cpu}/*
|
/kabidw-base/%{_target_cpu}/*
|
||||||
|
@ -2860,7 +2873,7 @@ fi
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with_gcov}
|
%if %{with_gcov}
|
||||||
%ifarch x86_64 s390x ppc64le aarch64
|
%ifarch x86_64 s390x ppc64le aarch64 riscv64
|
||||||
%files gcov
|
%files gcov
|
||||||
%{_builddir}
|
%{_builddir}
|
||||||
%endif
|
%endif
|
||||||
|
@ -2884,7 +2897,7 @@ fi
|
||||||
%ghost /%{image_install_path}/%{?-k:%{-k*}}%{!?-k:vmlinuz}-%{KVERREL}%{?3:+%{3}}\
|
%ghost /%{image_install_path}/%{?-k:%{-k*}}%{!?-k:vmlinuz}-%{KVERREL}%{?3:+%{3}}\
|
||||||
/lib/modules/%{KVERREL}%{?3:+%{3}}/.vmlinuz.hmac \
|
/lib/modules/%{KVERREL}%{?3:+%{3}}/.vmlinuz.hmac \
|
||||||
%ghost /%{image_install_path}/.vmlinuz-%{KVERREL}%{?3:+%{3}}.hmac \
|
%ghost /%{image_install_path}/.vmlinuz-%{KVERREL}%{?3:+%{3}}.hmac \
|
||||||
%ifarch %{arm} aarch64\
|
%ifarch %{arm} aarch64 riscv64\
|
||||||
/lib/modules/%{KVERREL}%{?3:+%{3}}/dtb \
|
/lib/modules/%{KVERREL}%{?3:+%{3}}/dtb \
|
||||||
%ghost /%{image_install_path}/dtb-%{KVERREL}%{?3:+%{3}} \
|
%ghost /%{image_install_path}/dtb-%{KVERREL}%{?3:+%{3}} \
|
||||||
%endif\
|
%endif\
|
||||||
|
|
Loading…
Reference in New Issue