Re: [PATCH RFC] hvmloader: Make ROM dependencies optional

Julian Pidancet
Wed, 08 Feb 2012 14:53:59 -0000

On Wed, Feb 8, 2012 at 1:28 PM, Ian Campbell <Ian.Campbell@citrix.com>
wrote:
> On Sun, 2012-02-05 at 16:18 +0000, Julian Pidancet wrote:
>> When booting HVMs with SeaBIOS, the BIOS itself takes care of
extracting
>> option ROMs from the PCI devices. These ROMs are usually provided with
by
>> the device model (qemu).
>> Thus, hvmloader should not require any longer the rombios, stdvga,
>> cirrusvga or etherboot ROMs to be present.
>>
>> Also, the 32bitbios_support.c file is specific to rombios and should
not
>> be built when building hvmloader with seabios.
>
>> [...]
>> @@ -475,16 +477,20 @@ int main(void)
>>         switch ( virtual_vga )
>>          {
>>          case VGA_cirrus:
>> +#ifdef ENABLE_CIRRUSVGA
>
> Just outside the context here is an "if ( bios->load_roms )"
which
> prevents the ROMs from being loaded if we are using SeaBIOS -- is that
> not sufficient for your needs?
>
> Currently hvmloader builds with support for both ROMBIOS and SeaBIOS and
> selects the one to use based on a configuration key in xenstore (pushed
> down by the toolstack depending on which qemu you are running). Have you
> modified something elsewhere in order to build a SeaBIOS-only hvmloader?
>
> Perhaps it would make sense for the ROMs to be keyed off whether or not
> ROMBIOS is enabled rather than each keying off their own DIR var?
>
> You seem to have mixed some other changes, specifically s/:=/?=/ in a
> few places and also some sort of change wrt how eb-roms.h is generated
> (including dropping the 8086100e ROM from the image, which must be
> discussed).
>
> These other changes should be submitted and rationalised separately.
>

The purpose of this change was initially to allow the user to build
hvmloader with SeaBIOS only without having to depend on rombios,
vgabios or ipxe. I've only tested my changes by calling make from the
hvmloader/ directory directly. The Xen build system could also not
have to depend on bcc for example.

In addition to the patch I submitted, I suppose it would make sense to
introduce a global configuration option for the Makefile in the
firmware/ directory to decide wether it should recurse in the rombios,
vgabios, and etherboot directories.

I changed some variable assignations := by ?= because I wanted the
user of the build system to be able to specify a custom build
directory for these ROMs.

Same thing for the etherboot ROM, I made the Makefile not use eb-rom.h
and replace it with a call to mkhex on the binary file directly, so
the user can choose which ROM to inject into hvmloader, and I found it
to be more consistent with the rest of the Makefile.

--
Julian

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com