2
0
mirror of https://github.com/xcat2/xcat-dep.git synced 2026-10-19 02:00:44 +00:00
Files
xcat-dep/grub2-xcat
Timothy Middelkoop b4ee060226 feat(xcat-dep): build the EL10 aarch64 dependency repository
xCAT already treats aarch64 as a target: BootPolicy hands an aarch64 node
boot/grub2/grub2.aarch64, and grub2.pm aborts the node's grub configuration
when that file is missing. xcat-dep neither ships the loader nor has an
aarch64 manifest section, so mockbuild-all.pl stops at "no manifest section
for target 'alma+epel-10-aarch64'" and an aarch64 node cannot netboot.

grub2-xcat generates grub2.aarch64. riscv64 ships the distro grub2 UEFI
image unchanged, but the EL grubaa64.efi carries the distro prefix
(/EFI/<vendor>) and never finds the boot/grub2/grub.cfg-<HEXIP> that
nodeset writes. %build runs grub2-mkimage -O arm64-efi -p /boot/grub2, the
prefix grub2.ppc uses, from the noarch grub2-efi-aa64-modules, so every EL
build host produces it. efi_uga stays out of the module list: it is x86
only and grub2-mkimage fails on it for arm64-efi. The image ships as
aarch64-efi/grubaa64.efi and %post copies it to grub2.aarch64, the boot file
of DHCP client architecture 11. The openEuler x86_64 repositories carry no
grub2-efi-aa64-modules and openEuler has no aarch64 target, so that build
ships without the image. mockbuild.pl checks the payload holds an AArch64
PE image. Release 3 -> 4.

[alma+epel-10-aarch64] is a native EPEL target like x86_64 and ppc64le, not
a forcearch cross-build like riscv64, and lists what [alma+epel-10-x86_64]
lists: the EL10 service node perl set (t/servicenode_perl_deps.t), and the
noarch x86 boot loaders, because an aarch64 management node serves the x86
nodes of a mixed cluster as a ppc64le one does.

Those loaders now build natively on aarch64 the way they do on ppc64le.
elilo-xcat ships its tracked prebuilt EFI payload, as on ppc64le: elilo
cannot compile on aarch64. syslinux-xcat admits aarch64 in ExclusiveArch and
takes the ppc64le path, installing the prebuilt bootloader blobs of the
release tarball. Both noarch rpms built on aarch64 carry the same payload,
byte for byte, as the published rh10/ppc64le ones. x86_64 and ppc64le
builds are unchanged.

t/aarch64_target.t holds the manifest cell to the EL10 x86_64 one and the
loader pins to EL10 ppc64le, checks how the spec generates, ships, installs
and removes grub2.aarch64, and where grub2-mkimage and the arm64-efi
modules are installed, runs the spec's own command, checks the image is
AArch64 with a /boot/grub2 prefix, and checks that adding efi_uga fails.

aarch64 is EL10 only and is not in the --finalize-xcat-dep cross-arch
genesis copy; BUILD.md says so.

Validated: a full mockbuild-all.pl --target alma+epel-10-aarch64 on an EL10
aarch64 host builds and verifies all 22 required packages (7 minutes).

Signed-off-by: Timothy Middelkoop <tmiddelkoop@internet2.edu>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 11:26:17 -05:00
..
2014-11-06 00:01:14 -08:00

#build steps:
1. 
#cp ./grub2-res.tar.gz /root/rpmbuild/SOURCES/
2.
rpmbuild -bb ./grub2-xcat.spec


#notes:
1.the grub2-res.tar.gz is generated by:
run the following cmd on a RHEL7-PPC64 node:
#grub2-mknetdir  --net-directory=/tftpboot/
#cd /tftpboot/boot/grub2/
#tar -czvf /tmp/grub2-res.tar.gz ./powerpc-ieee1275/




2.Please update the %version or %release when any modification is made for the files 


#riscv64:
riscv64 nodes boot through UEFI firmware and grub2 only. The file
grubriscv64.efi (Source2) is the unmodified grub2 UEFI image from the
Rocky Linux 10 riscv64 BaseOS tree (the copy used for installation media
and network boot, embedded prefix /EFI/BOOT):

  path:       BaseOS/riscv64/os/EFI/BOOT/grubriscv64.efi (Rocky Linux 10.2)
  built from: grub2-2.12-46.el10_2.rocky.0.1.src.rpm (GPL-3.0-or-later),
              the same build as grub2-efi-riscv64-2.12-46.el10_2.rocky.0.1
  sha256:     40baf4e65d20f73e6a5ec4f882d8a50450eaaf8b6688acf871824824ef0bad54

It is installed as /tftpboot/boot/grub2/riscv64-efi/grubriscv64.efi and
copied to /tftpboot/boot/grub2/grub2.riscv64 by the package scripts, which
is the boot file xCAT hands to DHCP client architecture 27 (0x001b). To
refresh it, take EFI/BOOT/grubriscv64.efi from the BaseOS tree of the EL10
release you target and record the release, source rpm and sha256 here.

#aarch64:
aarch64 nodes boot through UEFI firmware and grub2 only, like riscv64, but
the distro grubaa64.efi cannot be shipped as is: its embedded prefix points
at the distro's /EFI/<vendor> directory, so it never finds the
boot/grub2/grub.cfg-<HEXIP> that nodeset writes. The image is therefore
generated in %build with

  grub2-mkimage -O arm64-efi -p /boot/grub2 -o grubaa64.efi <modules>

(BuildRequires grub2-tools and the noarch grub2-efi-aa64-modules), the same
/boot/grub2 prefix the grub2.ppc core image uses. efi_uga is not in the
module list: it is x86 only and grub2-mkimage aborts on it for arm64-efi.
It is installed as /tftpboot/boot/grub2/aarch64-efi/grubaa64.efi and
copied to /tftpboot/boot/grub2/grub2.aarch64 by %post, which is the boot
file xCAT hands to DHCP client architecture 11 (0x000b). The openEuler
build carries no grub2-efi-aa64-modules and ships without the image.