Bug#759018: [PATCH RFC] Provide prebuilt grub-xen binaries for host (dom0) use
Colin Watson
cjwatson at debian.org
Sat Aug 30 19:12:06 UTC 2014
On Sat, Aug 30, 2014 at 01:28:44AM +0100, Ian Campbell wrote:
> Is there a policy regarding using e.g. people/foo branches in the main
> grub.git or shall I go create myself a gitorious repo for WIP stuff?
Given that it's basically me, I haven't really worried about policy, but
I generally think people/FOO/BAR type branches are a good idea.
> I've attached a little mini series which addresses the issues you raised
> and switches to the proposed /boot/xen naming scheme.
>
> I've also added some new patches.
This all LGTM. Please go ahead.
> The first causes grub-xen to actually produce things under /boot/xen,
> I'm not entirely sure about it though -- it
> places /boot/xen/pvboot-x86_64.elf as required but grubdir (e.g. all the
> modules etc) are still under /boot/grub. I wasn't sure if it was better
> to actually move grubdir to /boot/xen too.
I would be inclined to leave grubdir at the default. It already uses
platform-specific subdirectories, and there are already situations on
other platforms where the core image is placed somewhere else.
> The implementation is a bit
> unsatisfactory since grub-mkimage doesn't let you change only the output
> file without moving grubdir (AFAICT), so it generates and then moves it.
Seems surprising. Can't you use the -o option? I don't think that does
anything to grubdir. Or failing that the default is to output the image
to stdout, so you could just redirect.
Ah, but it looks like you're actually talking about grub-install here.
Yeah. Moving it after the fact isn't the end of the world, but armed
with a Xen-blessed spec I think we should fix grub-install upstream to
automatically DTRT here.
> diff --git a/debian/postinst.in b/debian/postinst.in
> index 558a50d..dcaea1d 100644
> --- a/debian/postinst.in
> +++ b/debian/postinst.in
> @@ -719,6 +719,16 @@ case "$1" in
> grub-yeeloong)
> grub-install --target=mipsel-loongson
> ;;
> +
> + grub-xen)
> + # Install for x86_64 regardless of arch, since a 32-bit userspace can still boot with a 64-bit kernel.
> + grub-install --target=x86_64-xen && mv /boot/grub/x86_64-xen/core.elf /boot/xen/pvboot-x86_64.elf
> + case $(dpkg --print-architecture) in
> + i386)
> + grub-install --target=i386-xen && mv /boot/grub/i386-xen/core.elf /boot/xen/pvboot-i386.elf
> + ;;
> + esac
> + ;;
> esac
>
> # If grub.cfg has been generated, update it.
> diff --git a/debian/rules b/debian/rules
> index 6a84461..44b8db9 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -343,6 +343,9 @@ install/grub-pc install/grub-efi-ia32 install/grub-efi-amd64 install/grub-efi-ia
> echo "$(package_bin): binary-from-other-architecture *efiemu64.o" \
> >> debian/$(package_bin)/usr/share/lintian/overrides/$(package_bin) ; \
> fi
> + if [ "$@" = "install/grub-xen" ] ; then \
> + mkdir -p debian/$(package_bin)/boot/xen ; \
> + fi
>
> mkdir -p debian/$(package_dbg)/usr/share/lintian/overrides
> echo "$(package_dbg): unstripped-binary-or-object *.module" \
You might consider doing this via dh_installdir instead; but I'm a bit
twitchy about packages directly shipping entries in /boot for some
reason. Maybe mkdir -p in the postinst (later in grub-install) instead?
Thanks,
--
Colin Watson [cjwatson at debian.org]
More information about the Pkg-grub-devel
mailing list