Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 586996 - sys-boot/grub:2 offer a platform to build 32 bit xen grub on amd64
Summary: sys-boot/grub:2 offer a platform to build 32 bit xen grub on amd64
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mike Gilbert
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2016-06-25 04:20 UTC by dwfreed
Modified: 2016-06-29 01:57 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
All changes, in one nice patch (grub_platform_xen-32.patch,9.42 KB, patch)
2016-06-25 04:20 UTC, dwfreed
Details | Diff
Diff between ebuild I started with and resulting ebuild, for easy comparison (ebuild.patch,1.11 KB, patch)
2016-06-25 04:22 UTC, dwfreed
Details | Diff
Profile changes to restrict new GRUB_PLATFORMS item to just amd64 for grub:2 (profile.patch,1.03 KB, patch)
2016-06-25 04:23 UTC, dwfreed
Details | Diff
Update to profiles/desc/grub_platforms.desc for new item (use_desc.patch,414 bytes, patch)
2016-06-25 04:24 UTC, dwfreed
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description dwfreed 2016-06-25 04:20:21 UTC
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?
Comment 1 dwfreed 2016-06-25 04:22:12 UTC
Created attachment 438688 [details, diff]
Diff between ebuild I started with and resulting ebuild, for easy comparison
Comment 2 dwfreed 2016-06-25 04:23:04 UTC
Created attachment 438690 [details, diff]
Profile changes to restrict new GRUB_PLATFORMS item to just amd64 for grub:2
Comment 3 dwfreed 2016-06-25 04:24:07 UTC
Created attachment 438692 [details, diff]
Update to profiles/desc/grub_platforms.desc for new item
Comment 4 Mike Gilbert gentoo-dev 2016-06-25 16:56:10 UTC
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.
Comment 5 Mike Gilbert gentoo-dev 2016-06-29 01:57:03 UTC
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(-)