--- rpm/arch-symbols | 2 +- rpm/config.sh | 1 + rpm/constraints.in | 16 ++++++++++++++++ rpm/dtb.spec.in.in | 2 +- rpm/kernel-binary.spec.in | 8 ++++++++ rpm/kernel-obs-build.spec.in | 2 +- rpm/macros.kernel-source | 3 +++ rpm/mkspec-dtb | 12 +++++++++++- scripts/run_oldconfig.sh | 3 +++ 9 files changed, 45 insertions(+), 4 deletions(-) diff --git a/rpm/arch-symbols b/rpm/arch-symbols index 6a80fdd35b5..9b82f9227db 100755 --- a/rpm/arch-symbols +++ b/rpm/arch-symbols @@ -25,7 +25,7 @@ if [ "$1" = "--list" ]; then # List all known architectures - echo i386 mips{,64} sparc{,64} ppc{,64,64le} s390{,x} ia64 x86_64 alpha parisc armv6hl armv7hl arm64 + echo i386 mips{,64} sparc{,64} ppc{,64,64le} s390{,x} ia64 x86_64 alpha parisc armv6hl armv7hl arm64 riscv64 exit 0 fi diff --git a/rpm/config.sh b/rpm/config.sh index 5d7e7abdb07..e8d35cfd372 100644 --- a/rpm/config.sh +++ b/rpm/config.sh @@ -6,6 +6,7 @@ VARIANT= OBS_PROJECT=openSUSE:Factory OBS_PROJECT_ARM=openSUSE:Factory:ARM OBS_PROJECT_PPC=openSUSE:Factory:PowerPC +OBS_PROJECT_RISCV=openSUSE:Factory:RISCV IBS_PROJECT=SUSE:Factory:Head IBS_PROJECT_ARM=Devel:ARM:Factory # Bugzilla info diff --git a/rpm/constraints.in b/rpm/constraints.in index cc7b34dffdb..66def47bf07 100644 --- a/rpm/constraints.in +++ b/rpm/constraints.in @@ -58,6 +58,22 @@ </hardware> </overwrite> + <!-- 35GB of disk and 2GB of memory for binary package on riscv64 --> + <overwrite> + <conditions> + <arch>riscv64</arch> +@BINARY_PACKAGES_XML@ + </conditions> + <hardware> + <disk> + <size unit="G">35</size> + </disk> + <memory> + <size unit="G">2</size> + </memory> + </hardware> + </overwrite> + <!-- 8 CPUs for binary packages on x86 --> <overwrite> <conditions> diff --git a/rpm/dtb.spec.in.in b/rpm/dtb.spec.in.in index 8badeb3a98f..9c9cd083d84 100644 --- a/rpm/dtb.spec.in.in +++ b/rpm/dtb.spec.in.in @@ -91,7 +91,7 @@ for dts in $ALL_SUPPORTED_DTB; do install -m 700 -d %{buildroot}%{dtbdir}/$(dirname $target) # install -m 644 COPYING %{buildroot}%{dtbdir}/$(dirname $target) install -m 644 $target.dtb %{buildroot}%{dtbdir}/$(dirname $target) -%ifarch aarch64 +%ifarch aarch64 riscv64 # HACK: work around U-Boot ignoring vendor dir baselink=%{dtbdir}/$(basename $target).dtb vendordir=$(basename $(dirname $target)) diff --git a/rpm/kernel-binary.spec.in b/rpm/kernel-binary.spec.in index b9a7cf2d8c3..1744fb950f8 100644 --- a/rpm/kernel-binary.spec.in +++ b/rpm/kernel-binary.spec.in @@ -379,6 +379,9 @@ case %cpu_arch in armv*) MAKE_ARGS="$MAKE_ARGS ARCH=arm" ;; + riscv*) + MAKE_ARGS="$MAKE_ARGS ARCH=riscv" + ;; *) MAKE_ARGS="$MAKE_ARGS ARCH=%cpu_arch" ;; @@ -557,6 +560,11 @@ add_vmlinux() image=Image cp -p arch/arm64/boot/$image %buildroot/boot/$image-%kernelrelease-%build_flavor %endif +%ifarch riscv64 + add_vmlinux --compressed + image=Image + cp -p arch/riscv/boot/$image %buildroot/boot/$image-%kernelrelease-%build_flavor +%endif # sign the modules, firmware and possibly the kernel in the buildservice BRP_PESIGN_FILES="" diff --git a/rpm/kernel-obs-build.spec.in b/rpm/kernel-obs-build.spec.in index 91ad608e444..9d68deb489d 100644 --- a/rpm/kernel-obs-build.spec.in +++ b/rpm/kernel-obs-build.spec.in @@ -136,7 +136,7 @@ ROOT="" %ifarch %arm %define kernel_name zImage %endif -%ifarch aarch64 +%ifarch aarch64 riscv64 %define kernel_name Image %endif diff --git a/rpm/macros.kernel-source b/rpm/macros.kernel-source index 1e695325975..5b8f6d61ac5 100644 --- a/rpm/macros.kernel-source +++ b/rpm/macros.kernel-source @@ -31,6 +31,9 @@ esac) (armv*) \ echo "arm" \ ;; \ + (riscv*) \ + echo "riscv" \ + ;; (*) \ echo "%cpu_arch" \ ;; \ diff --git a/rpm/mkspec-dtb b/rpm/mkspec-dtb index 504e1911189..92ca10ab604 100755 --- a/rpm/mkspec-dtb +++ b/rpm/mkspec-dtb @@ -83,6 +83,11 @@ my @aarch64_package_list = ( ['dtb-zte', 'zte/*.dts', "ZTE based arm64 systems"], ); +# DTB packages names +my @riscv64_package_list = ( + ['dtb-sifive', 'sifive/*.dts', "SiFive based riscv64 systems"], +); + sub generate_spec($$$) { my ($main_package, $exclusive_arch, $package_list) = @_; @@ -103,6 +108,8 @@ sub generate_spec($$$) my $DTS_folder = "arch/arm/boot/dts"; if ($exclusive_arch =~ /aarch64/) { $DTS_folder = "arch/arm64/boot/dts"; + } elsif ($exclusive_arch =~ /riscv64/) { + $DTS_folder = "arch/riscv/boot/dts"; } foreach my $NAME (@$package_list) { @@ -155,7 +162,7 @@ sub generate_spec($$$) } $subpkg_files .= - "%ifarch aarch64\n" . + "%ifarch aarch64 riscv64\n" . "%files -n $PKG_NAME -f $PKG_NAME.list\n" . "%else\n" . "%files -n $PKG_NAME\n" . @@ -195,3 +202,6 @@ generate_spec('dtb-armv6l', "armv6l armv6hl", \@armv6l_package_list); if ( grep( /aarch64/, @ARGV)) { generate_spec('dtb-aarch64', "aarch64", \@aarch64_package_list); } +if ( grep( /riscv64/, @ARGV)) { +generate_spec('dtb-riscv64', "riscv64", \@riscv64_package_list); +} diff --git a/scripts/run_oldconfig.sh b/scripts/run_oldconfig.sh index de637afa3ad..0a52bb4d927 100755 --- a/scripts/run_oldconfig.sh +++ b/scripts/run_oldconfig.sh @@ -400,6 +400,9 @@ for config in $config_files; do armv*/*) MAKE_ARGS="ARCH=arm" ;; + riscv*/*) + MAKE_ARGS="ARCH=riscv" + ;; */um) MAKE_ARGS="ARCH=um SUBARCH=$cpu_arch" ;; -- 2.22.0 -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org