From: Ian Campbell Subject: Re: What is tools/firmware/rombios/32bit/... used for? Date: Tue, 29 Jul 2014 09:44:52 +0100 Message-ID: <1406623492.15040.41.camel@kazak.uk.xensource.com> References: <53D6BD4C.9090708@overnetdata.com> <53D6D59C.2090803@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53D6D59C.2090803@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: Anthony Wright , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Mon, 2014-07-28 at 23:58 +0100, Andrew Cooper wrote: > On 28/07/2014 22:14, Anthony Wright wrote: > > I'm trying to build xen on a pure 64 bit system, but the build is > > failing when it tries to build > > tools/firmware/rombios/32bit/tcgbios/tcgbios.c with the error: > > > > /usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file > > or directory > > > > From reading around the error, it's caused by a lack of a 32 bit libc > > which would make sense as I only have a 64 bit libc on the system at the > > moment. To reduce the size of the distro (see my earlier Perl dependency > > post), I'd prefer to avoid having to build a 32 bit libc. I therefore > > wondered what tcgbios does and what the impact of failing to build the > > 32 bit support for it would be? > > > > thanks, > > > > Anthony. > > hvmloader is a 32bit binary. It is the first bit of code executed in > any HVM domain and has the job of preparing certain architectural bits > for the BIOS, followed by dropping into 16bit mode to execute the > provided BIOS image. Irrespective of the rest of your install, it does > have to be built as a 32bit ELF file, as 32bit is the start mode of HVM > domains. > > There is no way of avoiding the need for a 32bit set of headers if you > want to build the base components Xen needs to function. Note that this is a build time requirement only, I think. The final hvmloader binary is essentially statically linked and can be deployed onto a system without any 32bit headers/libc/etc present. To answer the original question /rombios/32bit is the parts of the ROMBIOS bios which run in 32-bit mode (the BIOS will thunk from 16- to/from 32-bit mode as necessary for various things). ROMBIOS is used with qemu-xen-traditional only so removing it will mean you can't use that. The header requirement for this is also build time only. Ian.