Initial attempt at v6.2 kernel for riscv64.

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
This commit is contained in:
David Abdurachmanov 2023-04-20 16:18:10 +03:00
parent 527ebac8b3
commit 3d6a2500e7
Signed by: davidlt
GPG Key ID: 8B7F1DA0E2C9FDBB
6 changed files with 15517 additions and 6 deletions

0
Module.kabi_dup_riscv64 Normal file
View File

0
Module.kabi_riscv64 Normal file
View File

12
filter-riscv64.sh.fedora Normal file
View File

@ -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

7730
kernel-riscv64-fedora.config Normal file

File diff suppressed because it is too large Load Diff

View File

@ -156,7 +156,7 @@ Summary: The Linux kernel
# This is needed to do merge window version magic
%define patchlevel 2
# This allows pkg_release to have configurable %%{?dist} tag
%define specrelease 300%{?buildid}%{?dist}
%define specrelease 300%{?buildid}.0.riscv64%{?dist}
# This defines the kabi tarball version
%define kabiversion 6.2.11
@ -506,6 +506,14 @@ Summary: The Linux kernel
%define kernel_image arch/arm64/boot/vmlinuz.efi
%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
# printed out?
%if %{nopatches}
@ -587,7 +595,7 @@ Release: %{pkg_release}
# DO NOT CHANGE THE 'ExclusiveArch' LINE TO TEMPORARILY EXCLUDE AN ARCHITECTURE BUILD.
# SET %%nobuildarches (ABOVE) INSTEAD
%if 0%{?fedora}
ExclusiveArch: noarch x86_64 s390x %{arm} aarch64 ppc64le
ExclusiveArch: noarch x86_64 s390x %{arm} aarch64 ppc64le riscv64
%else
ExclusiveArch: noarch i386 i686 x86_64 s390x %{arm} aarch64 ppc64le
%endif
@ -845,6 +853,8 @@ Source62: kernel-s390x-fedora.config
Source63: kernel-s390x-debug-fedora.config
Source64: kernel-x86_64-fedora.config
Source65: kernel-x86_64-debug-fedora.config
Source700: kernel-riscv64-fedora.config
Source701: kernel-riscv64-debug-fedora.config
Source67: filter-x86_64.sh.fedora
Source68: filter-armv7hl.sh.fedora
@ -852,6 +862,7 @@ Source70: filter-aarch64.sh.fedora
Source71: filter-ppc64le.sh.fedora
Source72: filter-s390x.sh.fedora
Source73: filter-modules.sh.fedora
Source702: filter-riscv64.sh.fedora
%endif
Source75: partial-kgcov-snip.config
@ -874,11 +885,13 @@ Source201: Module.kabi_aarch64
Source202: Module.kabi_ppc64le
Source203: Module.kabi_s390x
Source204: Module.kabi_x86_64
Source205: Module.kabi_riscv64
Source210: Module.kabi_dup_aarch64
Source211: Module.kabi_dup_ppc64le
Source212: Module.kabi_dup_s390x
Source213: Module.kabi_dup_x86_64
Source214: Module.kabi_dup_riscv64
Source300: kernel-abi-stablelists-%{kabiversion}.tar.bz2
Source301: kernel-kabi-dw-%{kabiversion}.tar.bz2
@ -1766,7 +1779,7 @@ BuildKernel() {
mkdir -p $RPM_BUILD_ROOT%{debuginfodir}/%{image_install_path}
%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 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
@ -2640,7 +2653,7 @@ find $RPM_BUILD_ROOT/usr/include \
%if %{with_cross_headers}
%if 0%{?fedora}
HDR_ARCH_LIST='arm arm64 powerpc s390 x86'
HDR_ARCH_LIST='arm arm64 powerpc s390 x86 riscv64'
%else
HDR_ARCH_LIST='arm64 powerpc s390 x86'
%endif
@ -3096,7 +3109,7 @@ fi
%endif
%if %{with_kabidw_base}
%ifarch x86_64 s390x ppc64 ppc64le aarch64
%ifarch x86_64 s390x ppc64 ppc64le aarch64 riscv64
%files kernel-kabidw-base-internal
%defattr(-,root,root)
/kabidw-base/%{_target_cpu}/*
@ -3260,7 +3273,7 @@ fi
%ghost /%{image_install_path}/%{?-k:%{-k*}}%{!?-k:vmlinuz}-%{KVERREL}%{?3:+%{3}}\
/lib/modules/%{KVERREL}%{?3:+%{3}}/.vmlinuz.hmac \
%ghost /%{image_install_path}/.vmlinuz-%{KVERREL}%{?3:+%{3}}.hmac \
%ifarch %{arm} aarch64\
%ifarch %{arm} aarch64 riscv64\
/lib/modules/%{KVERREL}%{?3:+%{3}}/dtb \
%ghost /%{image_install_path}/dtb-%{KVERREL}%{?3:+%{3}} \
%endif\
@ -3346,6 +3359,9 @@ fi
#
#
%changelog
* Thu Apr 20 2023 David Abdurachmanov <davidlt@rivosinc.com> [6.2.11-0.0.riscv64]
- Add support for riscv64
* Thu Apr 13 2023 Augusto Caringi <acaringi@redhat.com> [6.2.11-0]
- Linux v6.2.11