[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UEFI booting, and compiling Xen


  • To: xen-users@xxxxxxxxxxxxxxxxxxxx
  • From: Paul Leiber <paul@xxxxxxxxxxxxxxxx>
  • Date: Fri, 8 Nov 2024 22:51:40 +0100
  • Arc-authentication-results: i=1; strato.com; arc=none; dkim=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1731102701; s=strato-dkim-0002; d=strato.com; h=In-Reply-To:From:References:To:Subject:Date:Message-ID:Cc:Date:From: Subject:Sender; bh=zJ5JZO+2TKWdkbDnkdNZZqja6jg9wZXIbKdgRGxR/QQ=; b=m3fhZtR/UhHNYK/EJ7qVXDdGWN33j1cu4Jc1OGErYyDoIWNf5cFAky7Jisc3GKJ2J+ lFrnwfRphe0kzsknUvYQe6xOtdlGhWx2duPZ90cwOmDBi8lcaX+IzR7dqVB7+dtDo2tF HJMTqCnDRWV8/DFjwAiRehu3jv47C255rLDGp7PsZ/r++cDccOzYYvSCr6NVOZXhtiry KcsOU46GxdfVauef9KnFjIta0itNSUPoTju6Mm9t2cAdwpsM6xWCmvdw9NI8fOZhJ72O 6y8ucuKVeD3qxHmDrOjkQ5YzzWWVnOSs+01E91Sve78IIZkE+A2YLTK/i/6yk2gHmIze v5Yg==
  • Arc-seal: i=1; a=rsa-sha256; t=1731102701; cv=none; d=strato.com; s=strato-dkim-0002; b=eGBvPq+LnY5982Qb+F1rUU76ddSZnedM5uY5lsIxLujIP9DqoxswgiM9hbhnH1rQKW TWChbxteZmJkQXwlkq1aXJanSUPqZqzWvvMUp3AgePT+2gvw7NvEQvrnjjuolSHmSHAu 7h+/gBPa9kMaVaWYZvIrvdjAUEP86sSFiKq9frJdha+yQSXLS9YA7tjXMAn6RUkfXGy0 0M0k5RYFl5gWjXyWwf5B7yb/tFA2x7hp9AysinnUnBDc/MDPKUgtjj1xvVgQu4aiKxAA vM2ST2OEPpkKtfaJBjsv+4Nsmu0HqHfLObAxu5aNIfDiWCHSfx+qxcK8j+WcG2fWtUDt S7qA==
  • Delivery-date: Fri, 08 Nov 2024 21:52:41 +0000
  • List-id: Xen user discussion <xen-users.lists.xenproject.org>

HI,

Am 08.11.2024 um 11:06 schrieb rb+xen-users@xxxxxxxxxxxxxx:

I am trying to compile Xen from source in order to experiment with features not available in OS distributions.  Specifically, I want UEFI booting, for which I think I need OVMF <https://wiki.xenproject.org/ wiki/OVMF> in Xen 4.4.  (If anyone has another method for getting that based on e.g. Alpine Linux 3.20 I would like to know!)

AFAIK, Xen is currently on version 4.19. Xen 4.4 has been released in 2014. Do you really need this old a version?

The instructions for Compiling Xen From Source <https:// wiki.xenproject.org/wiki/Compiling_Xen_From_Source> seem very out of date.  Many of the build dependencies listed do not even exist in recent distributions.

I managed to compile Xen 4.18 and 4.19 on Debian Bookworm based on the same instructions from the wiki. These were the main commands I used:

apt install ninja-build
apt build-dep xen
./configure  --libdir=/usr/lib --sysconfdir=/etc
make dist
make install
update-grub
systemctl enable xencommons
systemctl enable xendomains
systemctl enable xen-watchdog
systemctl enable xendriverdomain

Of course, the Xen sources need to be available on the local system. I cloned the Xen git repository.

I'm sure someone out there has a stable baseline for builds.  For example, someone is likely running automated builds on well known cloud baselines plus some configuration.  I'd like to see that configuration. I've had a look around on <https://xenbits.xen.org/gitweb/> but could do with a pointer.  The sort of information I'm looking for is a setup for a stable build platform, like <https://github.com/Ravenbrook/mps/blob/ master/.github/workflows/build-and-test.yml> (though this isn't a great example as it has no package dependencies).

If I can get the information together I can post a working recipe and update the wiki.

My build platform of choice is Ubuntu 22 with LXD.  I'm happy to launch LXD containers for other distributions and older versions.  What I'd like is a working recipe for setting up a build environment from a known baseline.

Here is an example of such a recipe:

   rb@kiwi:~$ lxc launch -s kiwi-tmp images:debian/12 xen-build
   rb@kiwi:~$ lxc exec xen-build -- bash --login
   root@xen-build:~# apt-get install --yes build-essential git
   root@xen-build:~# git clone -b stable-4.4 git://xenbits.xen.org/xen.git
  root@xen-build:~# sed -ne 's/^deb /deb-src /p' < /etc/apt/ sources.list >> /etc/apt/sources.list
   root@xen-build:~# apt-get build-dep xen
   root@xen-build:~# cd xen
   root@xen-build:~/xen# ./configure

Unfortunately, this is where things break.  The configure script is looking for Python 2, which is long gone.

Could your issue be due to the fact that Xen 4.4 is actually also "long gone"? I am not surprised that trying to compile Xen 4.4 on a modern distribution is not working out of the box.

A simple web search brought up some things to try (I didn't test them myself). Did you try to put debian stretch into sources.list and manually install the Python 2 package? Alternatively, you could compile Python 2 from source.

I can of course build the version from Debian's package repo but that doesn't help much.

   root@xen-build:~# apt-get source xen
   root@xen-build:~# cd xen-4.17.3+10-g091466ba55/
   root@xen-build:~/xen-4.17.3+10-g091466ba55# dpkg-buildpackage

As I mentioned above, the documented build dependencies on the wiki <https://wiki.xenproject.org/wiki/ Compiling_Xen_From_Source#Build_Dependencies_-_Debian_/_Ubuntu> are very out of date.

The wiki page even talks about Debian Wheezy as if it's new.  It was released in 2016.

Yes, the wiki is out of date, but many of the instructions I have been using (mainly the howto and the build instructions) still work, with some adjustments of details. (Please don't get me wrong, this does not mean that I don't think the wiki deserves updates. AFAIK, there are ongoing activities to update the documentation while switching to a different documentation platform.)

Paul






 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.