diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index 9107f26ed..334f17108 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -1342,7 +1342,7 @@ sub mkinstall if ( ( - ( $arch =~ /x86/ or $arch =~ /aarch64/ ) and + ( $arch =~ /x86/ or $arch =~ /aarch64/ or $arch =~ /riscv64/ ) and ( -r "$pkgdir/images/pxeboot/vmlinuz" and $kernpath = "$pkgdir/images/pxeboot/vmlinuz" @@ -2798,7 +2798,7 @@ sub insert_dd { # and copy it to the /tftpboot my @new_kernels = <$dd_dir/rpm/boot/vmlinuz*>; foreach my $new_kernel (@new_kernels) { - if (-r $new_kernel && $new_kernel =~ /\/vmlinuz-(.*(x86_64|ppc64|el\d+|ppc64le|aarch64))$/) { + if (-r $new_kernel && $new_kernel =~ /\/vmlinuz-(.*(x86_64|ppc64|el\d+|ppc64le|aarch64|riscv64))$/) { $new_kernel_ver = $1; $cmd = "/bin/mv -f $new_kernel $kernelpath"; xCAT::Utils->runcmd($cmd, -1); diff --git a/xCAT-server/lib/xcat/plugins/geninitrd.pm b/xCAT-server/lib/xcat/plugins/geninitrd.pm index 157280ee7..47b07e883 100644 --- a/xCAT-server/lib/xcat/plugins/geninitrd.pm +++ b/xCAT-server/lib/xcat/plugins/geninitrd.pm @@ -189,7 +189,9 @@ sub geninitrd { unless (-d $tftppath) { mkpath $tftppath; } - if ($arch =~ /x86/) { + # riscv64 installation media exist for the EL family only; leave any other + # distribution to the "unknow arch" error below instead of reading it as x86 + if ($arch =~ /x86/ or ($arch =~ /riscv64/ and $osvers !~ /sles|suse/)) { if ($osvers =~ /(^ol[0-9].*)|(centos.*)|(alma.*)|(rocky.*)|(rh.*)|(fedora.*)|(SL.*)/) { $kernelpath = "$tftppath/vmlinuz"; copy("$pkgdir/images/pxeboot/vmlinuz", $kernelpath); diff --git a/xCAT-server/share/xcat/netboot/imgutils/imgutils.pm b/xCAT-server/share/xcat/netboot/imgutils/imgutils.pm index ea01a75ff..a5881c984 100644 --- a/xCAT-server/share/xcat/netboot/imgutils/imgutils.pm +++ b/xCAT-server/share/xcat/netboot/imgutils/imgutils.pm @@ -256,6 +256,7 @@ sub default_net_drivers { x86 => [qw(tg3 bnx2 bnx2x e1000 e1000e igb mlx_en mlx5_core virtio_net be2net)], x86_64 => [qw(tg3 bnx2 bnx2x e1000 e1000e igb mlx_en mlx5_core virtio_net be2net)], aarch64 => [qw(tg3 bnx2 bnx2x e1000e igb mlx_en mlx5_core virtio_net)], + riscv64 => [qw(e1000 e1000e igb ixgbe r8169 tg3 bnx2x mlx5_core virtio_net)], ppc64 => [qw(e1000 e1000e igb ibmveth ehea)], s390x => [qw(qdio ccwgroup)], }, diff --git a/xCAT-server/share/xcat/netboot/rh/genimage b/xCAT-server/share/xcat/netboot/rh/genimage index 20424cd82..3dc1c392d 100755 --- a/xCAT-server/share/xcat/netboot/rh/genimage +++ b/xCAT-server/share/xcat/netboot/rh/genimage @@ -1924,7 +1924,7 @@ EOMS } } - if ($arch =~ /x86_64/ or $arch =~ /aarch64/) { + if ($arch =~ /x86_64/ or $arch =~ /aarch64/ or $arch =~ /riscv64/) { push @filestoadd, "lib64/libnss_dns.so.2"; push @filestoadd, "lib64/libresolv.so.2"; } else {