Created attachment 438686 [details, diff] All changes, in one nice patch grub2 should offer a platform that builds the xen platform in 32 bit mode on amd64 hosts. This is needed for Xen hosts because the first "kernel" Xen loads for the VM permanently decides the VM's bitness until it is shut down, as a result of architectural differences between amd64 PV guests and x86 PV guests. So in order to boot a 32 bit PV guest via pvgrub2 (aka grub2's xen platform), you need to have a 32 bit pvgrub2. I've attached a patch which provides another item, xen-32, in GRUB_PLATFORMS which will build the xen platform in 32 bit mode. The patch needs to be applied from the root of repo/gentoo because there are profile changes to restrict the new GRUB_PLATFORMS item to just amd64, as well as add the useflag description entry. I've also attached patches which are just the ebuild changes, the profile changes, and the useflag description change, respectively, so you can easily inspect each one if you wish. Cardoe, could you test this for me and validate that it works?
Created attachment 438688 [details, diff] Diff between ebuild I started with and resulting ebuild, for easy comparison
Created attachment 438690 [details, diff] Profile changes to restrict new GRUB_PLATFORMS item to just amd64 for grub:2
Created attachment 438692 [details, diff] Update to profiles/desc/grub_platforms.desc for new item
I don't think we need a revbump for this, since the changes are stuffed behind a new USE flag. Otherwise, it looks ok to me.
commit d61119fb4ea2112ed2f08be53566d75b4b325e97 Author: Douglas Freed <dwfreed@mtu.edu> Date: Tue Jun 28 21:43:11 2016 -0400 sys-boot/grub: add xen-32 platform This builds 32-bit Xen on amd64. Bug: https://bugs.gentoo.org/586996 profiles/arch/amd64/package.use.mask | 4 ++++ profiles/base/package.use.mask | 4 ++++ profiles/desc/grub_platforms.desc | 1 + sys-boot/grub/grub-2.02_beta3-r1.ebuild | 8 +++++++- sys-boot/grub/grub-9999-r1.ebuild | 8 +++++++- 5 files changed, 23 insertions(+), 2 deletions(-)