mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-09-04 20:17:55 +00:00
feat(xCAT-server): install and netboot EL10 riscv64 nodes
EL riscv64 media lay out the installer kernel and initrd under
images/pxeboot exactly like x86 and aarch64 media, but anaconda.pm only
looked there for those two families and geninitrd.pm refused riscv64
outright ("unknow arch"). Treat riscv64 like x86/aarch64 in both
places and recognise riscv64 kernels when a driver disk updates the
installer kernel. There is no riscv64 SUSE media, so geninitrd keeps the
unsupported-architecture error for sles/suse rather than reading the x86
SUSE layout.
Diskless images get a riscv64 default network driver list (virtio,
Intel, Realtek, Broadcom and Mellanox) and take the resolver libraries
from lib64, which is where riscv64 EL puts them.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)],
|
||||
},
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user