According to UEFI 2.4 specification, default boot file name on AArch64
is BOOTAA64.EFI (3.4.1.1 Removable Media Boot Behavior). Also set default
GRUB image name to grubaa64.efi to match it.
grub-install already resolved passed install device to grub device. So do the
same as grub-setup and strip parenthesis if we get legacy (hdX).
I accidentally commited revert of 69ca97c820 and
this patch as part of f585c90505. So this commit
just adds ChangeLog entry and cosmetic whitespace fix.
/usr/local/grub2/sbin/grub-install: info: grub-mkimage --directory '/usr/local/grub2/lib/grub/i386-pc' --prefix '(mduuid/e6d1dcf06cea72140bafae74a8677f36)/grub' --output '/boot/grub/i386-pc/core.img' --format 'i386-pc' --compression 'auto' 'ext2' 'msdos' 'msdos' 'diskfilter' 'mdraid1x' 'biosdisk'
.
/usr/local/grub2/sbin/grub-install: error: cannot open `/usr/local/grub2/lib/grub/i386-pc/msdos.mod': No such file or directory.
Introduce common helper for both diskfilter and non-diskfilter case that
converts partition map names into module names.
Compare function used in qsort gets arguments by reference, so strcmp
cannot be used directly - it expects pointer to char, but gets pointer
to pointer to char.
Introduce new helper grub_qsort_strcmp and use it in grub-install.
This helper is going to be used in a couple more places as well so
add it to global file, not in grub-install.c.
the function of these files exceeds what can be sanely handled in shell
in posix-comaptible way. Also writing it in C extends the functionality
to non-UNIX-like OS and minimal environments.