From 9549e660f95c20707a202e11992865f07c7cc3e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Thu, 20 Aug 2026 16:32:27 -0300 Subject: [PATCH] feat(dhcp): boot RISC-V 64-bit UEFI clients with grub2 RISC-V 64-bit UEFI firmware identifies itself with DHCP option 93 client-system-architecture 27 (0x001b, IANA processor architecture types). Neither DHCP backend knew the value: Kea handed such clients no boot file and ISC dhcpd fell through to the /yaboot catch-all. Add an xcat-riscv64 Kea client class and an ISC subnet branch that send them boot/grub2/grub2.riscv64, the same shape as the aarch64 entries. The UEFI HTTP boot id (0x001c) is left alone: it needs a URL boot file and the HTTPClient vendor class, which is a separate change. --- perl-xCAT/xCAT/DHCP/BootPolicy.pm | 5 +++++ xCAT-server/lib/xcat/plugins/dhcp.pm | 3 +++ 2 files changed, 8 insertions(+) diff --git a/perl-xCAT/xCAT/DHCP/BootPolicy.pm b/perl-xCAT/xCAT/DHCP/BootPolicy.pm index c24992d8c..98f1f0b62 100644 --- a/perl-xCAT/xCAT/DHCP/BootPolicy.pm +++ b/perl-xCAT/xCAT/DHCP/BootPolicy.pm @@ -36,6 +36,11 @@ sub kea_client_classes { test => 'option[93].hex == 0x000b', 'boot-file-name' => 'boot/grub2/grub2.aarch64', }, + { + name => 'xcat-riscv64', + test => 'option[93].hex == 0x001b', + 'boot-file-name' => 'boot/grub2/grub2.riscv64', + }, { name => 'xcat-ppc64', test => 'option[93].hex == 0x000c', diff --git a/xCAT-server/lib/xcat/plugins/dhcp.pm b/xCAT-server/lib/xcat/plugins/dhcp.pm index c6afb2adb..1505f4610 100644 --- a/xCAT-server/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server/lib/xcat/plugins/dhcp.pm @@ -4467,6 +4467,9 @@ sub addnet push @netent, " } else if option client-architecture = 00:0b { #aaarch64\n "; push @netent, " filename \"boot/grub2/grub2.aarch64\";\n"; + push @netent, + " } else if option client-architecture = 00:1b { #riscv64 uefi\n "; + push @netent, " filename \"boot/grub2/grub2.riscv64\";\n"; push @netent, " } else if option client-architecture = 00:0e { #OPAL-v3\n "; push @netent, " option conf-file = \"http://$tftp$portsuffix/tftpboot/pxelinux.cfg/p/" . $net . "_" . $maskbits . "\";\n";