Task

Building Xen 4.2.2 on Ubuntu Server 12.04.2

posted in Hypervisor
Tuesday, July 09 2013, 10:04 PM
0
Hi, I'm building Xen 4.2.2 for my 12.04.2 server. Have it working kinda and have debugged a ./configure parameter to override the make process looking to put some files into a none existent /usr/lib64 directory.

I use EFI boot at present and I've read around including the manual here http://xenbits.xen.org/docs/4.2-testing/misc/efi.html where it says to build a xen.efi file to use in replace of /boot/efi/EFI/ubuntu/grubx64.efi. From my reading this is so that Xen can handle EFI systems, it being the first thing that needs to load.

I need to pass in a EFI_VENDOR parameter so that the build process knows where to put the resulting xen.efi file but I can't fathom where to specify this properly. I've found this thread https://aur.archlinux.org/packages/x...l&comments=all and a few others that note about this parameter but nothing that describes the intended build steps needed.

Do I just edit the makefile and define this variable at the top? Would appreciate any pointers.

Thanks,

K

Accepted Answer

Saturday, July 13 2013, 02:29 PM - #permalink
0
Okay so I've now managed to build a xen-4.2.2.efi, my problem was binutils not having i386pep enabled which killed the xen build for efi.

I downloaded the lastest binutils source and issued...

./configure --enable-targets=x86_64-pep --bindir=/usr/bin --with-sysroot=\
make
sudo make install

Found I needed to logout and back in for the changes to cement, confirm via "ld -V" and you now have i386pep in the list.

Xen 4.2.2 built rather easily then, the .efi binaries were located in /usr/lib64/efi/, I still haven't found a solution to setting the EFI_VENDOR variable although some posts seem to say the OP's are passing in parameters for the xen build like...

./configure LD=xxxxx

I've not tried this myself, I just cp'd the .efi file out of the /usr/lib64/efi location into my /boot/efi/EFI/ubuntu dir./

The .efi seems to boot now, it looks and finds the .cfg file needed, my current problem is it says it can't locate the Dom0 Kernel so I'm now working through this.

Little more background on the binutils issue... http://comments.gmane.org/gmane.comp.emulators.xen.user/76385

Cheers,

K
The reply is currently minimized Show
Responses (2)
  • Accepted Answer

    Lars Kurth
    Lars Kurth
    Offline
    Wednesday, July 10 2013, 09:08 AM - #permalink
    0
    Kelvin,

    I think this is the type of question where you could a developer's input (and where a lot of users will be out-of-their depth). They tend to hang out on xen-devel@lists.xenproject.org ... you can send a mail to the list without subscribing. Just be concise. And when you do get an answer, it would be great if you could point to it from here (and mark the question as closed).The general build instructions are at http://wiki.xen.org/wiki/Compiling_Xen (if you have not seen them yet).

    There was also some activity in the last few days on EFI - see "adjust x86 EFI build" in http://lists.xenproject.org/archives/html/xen-devel/2013-07/ - which may be relevant.

    Lars
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, July 10 2013, 09:19 PM - #permalink
    0
    Hi Lars, really appreciate the help...your post prompted me to start reading around the mail list and linked me through to a few post that I think helped me with my issue. (New to mail lists :-\)

    Firstly here http://xenbits.xen.org/docs/4.2-testing/misc/efi.html says that binutils needs to be configured to support x86_64-pep emulation (not really sure what this is yet).

    This post http://lists.xen.org/archives/html/xen-users/2012-11/msg00043.html then advises on how to check your binutils build and its current capabilities. (Mine is missing i386pep or any references to *pep)

    A search on binutils and this particular problem led me here http://comments.gmane.org/gmane.comp.emulators.xen.user/76385 where the OP is having the exact same issues as myself. The thread advises how to read the xen build logs and I've now confirmed via this that my build is disabling EFI support due to the binutils mis-configuration.

    So I'm going to try and solve my binutils config/build first before posting into the mail lists.

    I'll come back and confirm my success or otherwise once I've read-up and tested further. (I'm not up on the proper etiquette so should I make this thread a resolved now as my problem is likely user error rather than anything undocumented or incorrect or wait until I've finished debugging this?)

    Thanks for your help.

    Kelvin
    The reply is currently minimized Show
Your Reply