build riscv

This commit is contained in:
Alexander Stefanov 2023-07-29 21:25:45 +00:00
parent c1992edf58
commit 51eafaa2d8
2 changed files with 13 additions and 5 deletions

View file

@ -9097,7 +9097,7 @@ CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
# CONFIG_DEBUG_INFO_REDUCED is not set
# CONFIG_DEBUG_INFO_COMPRESSED is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
CONFIG_DEBUG_INFO_BTF=y
CONFIG_DEBUG_INFO_BTF=n
# CONFIG_GDB_SCRIPTS is not set
CONFIG_FRAME_WARN=2048
CONFIG_STRIP_ASM_SYMS=y

View file

@ -56,6 +56,9 @@
%ifarch aarch64
%define arch_suffix arm64
%endif
%ifarch riscv64
%define arch_suffix riscv64
%endif
%define buildrpmrel %{fullrpmrel}%{rpmtag}-%{arch_suffix}
%define buildrel %{kversion}-%{buildrpmrel}
@ -82,7 +85,7 @@
%endif
# Build binary out-of-tree kernel modules (experimental)
%bcond_without binary_extra_modules
%bcond_with binary_extra_modules
# Sign kernel modules with GOST key (experimental)
%bcond_without gost_sign
@ -247,6 +250,9 @@ cat %{_builddir}/debugfiles.list >> %{debuginfo_files}
%ifarch aarch64
%define arch_type arm64
%endif
%ifarch riscv64
%define arch_type riscv
%endif
# Parallelize xargs invocations on smp machines
%define kxargs xargs %([ -z "$RPM_BUILD_NCPUS" ] \\\
@ -264,7 +270,7 @@ License: GPLv2
Group: System/Kernel and hardware
Url: https://www.kernel.org
ExclusiveArch: %{x86_64} %{ix86} aarch64
ExclusiveArch: %{x86_64} %{ix86} aarch64 riscv64
####################################################################
#
@ -286,6 +292,7 @@ Source3: macros.ksobirator
Source111: kernel-x86_64.config
Source112: kernel-i686.config
Source113: kernel-arm64.config
Source114: kernel-riscv64.config
# Cpupower: the service, the config, etc.
Source50: cpupower.service
@ -1023,6 +1030,7 @@ echo "Creating the kernel configuration file."
cp %{SOURCE111} .
cp %{SOURCE112} .
cp %{SOURCE113} .
cp %{SOURCE114} .
cp kernel-%{arch_suffix}.config .config
touch %{build_dir}/.config.append
@ -1482,8 +1490,8 @@ install -m 644 Module.symvers.zst %{temp_boot}/symvers-%{kver_full}.zst
%make_build ARCH=%{arch_type} V=1 INSTALL_DTBS_PATH=%{temp_boot}/dtb-%{kver_full} dtbs_install
%endif
%ifarch aarch64
cp -f arch/arm64/boot/Image* %{temp_boot}/vmlinuz-%{kver_full}
%ifarch aarch64 riscv64
cp -f arch/%{arch_type}/boot/Image* %{temp_boot}/vmlinuz-%{kver_full}
%else
cp -f arch/%{arch_type}/boot/bzImage %{temp_boot}/vmlinuz-%{kver_full}
%endif