61 Commits
Author SHA1 Message Date
Jan Beulich c5be91eb81 mktarball: only archive Xen
As was basically decided already a while ago, remove - in the simplest
possible way - the archiving of both qemu-s and mini-os from tarball
generation.

With this the subtree-force-update-all prereq isn't needed anymore in
the top level Makefile. That goal, including the respective ones
underneath tools/, then also are unreferenced and hence are being
dropped, too.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2024-09-04 16:07:41 +02:00
Roger Pau Monne 7225f6e0cd tools/firmware: fix setting of fcf-protection=none
Setting the fcf-protection=none option in EMBEDDED_EXTRA_CFLAGS in the
Makefile doesn't get it propagated to the subdirectories, so instead
set the flag in firmware/Rules.mk, like it's done for other compiler
flags.

Fixes: 3667f7f8f7 ('x86: Introduce support for CET-IBT')
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2022-04-04 12:30:00 +01:00
Andrew Cooper 3667f7f8f7 x86: Introduce support for CET-IBT
CET Indirect Branch Tracking is a hardware feature designed to provide
forward-edge control flow integrity, protecting against jump/call oriented
programming.

IBT requires the placement of endbr{32,64} instructions at the target of every
indirect call/jmp, and every entrypoint.

However, the default -fcf-protection=branch places an endbr{32,64} on every
function which far more than necessary, and reduces the quantity of protection
afforded.  Therefore, we use manual placement using the cf_check attribute.

It is necessary to check for both compiler and assembler support, as the
notrack prefix can be emitted in certain cases.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2022-02-23 15:33:42 +00:00
Anthony PERARD c2a535325e tools: remove some unneeded subdir-distclean-* targets
Those two are already covered by subdir-distclean-% target in
Rules.mk.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2021-12-09 16:26:29 +00:00
Hubert Jasudowicz a623841b85 tools/firmware: Fix typo in uninstall target
When ipxe.bin is missing, make uninstall will fail due to
wrong switch (-r) passed to rm command. Replace it with -f.

Signed-off-by: Hubert Jasudowicz <hubert.jasudowicz@cert.pl>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Acked-by: Wei Liu <wl@xen.org>
2020-08-27 09:35:35 +00:00
Roger Pau Monne 8845155c83 pvshim: make PV shim build selectable from configure
So a user can decide whether to compile a PV shim as part of the tools
build. Note that the default behavior is preserved, which is to build
a PV shim when the target or host (if target is unset) architecture is
64bit x86.

Requested-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
[ wei: run autogen.s ]
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
2019-05-15 10:49:30 +01:00
Wei Liu 4be26bd61e tools: building IPXE should be determined by CONFIG_IPXE
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2018-08-26 10:52:18 +01:00
Olaf Hering 773b86303f tools/firmware: reproducible seabios build
The build system of seabios always includes the current time and the
hostname into the resulting binary. To avoid that, it is required to
have a file '.version' in the toplevel directory of seabios-dir-remote.
And it is required to pass EXTRAVERSION= to make because its toplevel
Makefile does not take EXTRAVERSION from environment.

Adjust the code to create a '.version' file with fixed content.
Adjust the code to pass EXTRAVERSION down to make.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2018-07-18 17:32:19 +01:00
Wei Liu e4506f404c tools: load IPXE from standalone file
Do not embed IPXE into Rombios anymore. Instead, it is loaded by the
toolstack from a file as a separate module.

Ability to let user specify an IPXE blob will come later.

No user visible change.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2018-07-16 16:09:01 +01:00
Roger Pau Monne 1233d253a4 firmware/seabios: fix build on systems with non GNU toolchains
SeaBIOS requires gcc and GNU ld in order to build, so allow setting
SEABIOSCC and SEABIOSLD by the caller when building in order to pass
the path to the compiler and linker that should be used when building
SeaBIOS.

Note that the LD32BIT-y variable was used by FreeBSD builds and is no
longer needed due to the ability to select the LD to use for SeaBIOS
builds, so remove it.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2018-07-10 08:41:53 +01:00
Roger Pau Monné b38c4e1763 build: remove shim related targets
There's no need to have shim specific targets, so just use the regular
xen makefile targets in order to build the shim binary.

When the shim is build as part of the firmware directory install the
stripped Xen binary to the firmware directory and place a binary with
symbols in the debug directory.

The objcopy step of the shim build is also removed in this patch:
since the shim is booted in PVH mode there's no need for the resulting
binary to be in elf32 format. Xen can load PVH kernels with either a
32 or 64bit elf header.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2018-02-23 11:05:19 +01:00
Wei Liu 36c560e7f3 Don't build xen-shim for 32 bit build host
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
2018-01-16 18:56:45 +00:00
Andrew Cooper 4ee1b6eb8a tools/firmware: Build and install xen-shim
Link a minimum set of files to build the shim. The linkfarm rune can
handle creation and deletion of files. Introduce build-shim and
install-shim targets in xen/Makefile.

We can do better by properly generate the dependency from the list of
files but that's an improvement for later.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
2018-01-16 18:34:04 +00:00
Petre Pircalabu f2b40dabab Makefile: Fix uninstall target
Running "make uninstall" does not remove all installed files, a
situation which might cause link related issues if xen is re-installed
in a different location.
In order to make uninstall correctly remove the files it is best
the process should be done recursively by mirroring each "install"
target with an "uninstall" who removes the installed files.

An exception to this rule is uninstalling the files produced by
"qemu-xen-dir-remote" and "qemu-xen-traditional-dir", which are external
to the project. These projects do not implement an "uninstall" target so
the files have to be removed manually.

Signed-off-by: Petre Pircalabu <ppircalabu@bitdefender.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2017-07-28 17:47:42 +01:00
Wei Liu 0a5370ee1f seabios: run olddefconfig
We provided a base config file in 970f8de3e. To generate a full config
file, running olddefconfig is required.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Release-acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2017-04-26 16:57:07 +01:00
Paul Durrant 970f8de3e4 tools/firmware: use a canned config for seabios
The use of seabios defconfig kills boot performance of Windows guests
because the default is for the int13 handler to use PIO when accessing
the emulated IDE device.

By instead using a canned configuration with the ATA settings overridden
to enable DMA access (and also wider PIO) boot performance is markedly
improved without the need to use a different (and possibly not supported)
device model.

This patch adds the canned configuration into tools/firmware and modifies
the Makefile rule to copy it into place.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2017-03-29 18:28:51 +01:00
Wei Liu b2f2ced591 tools/firmware: Rename bios.bin to seabios.bin
bios.bin as a name is far too generic.  Rename it to seabios.bin.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
[ wei: fix up conflict, rerun autogen.sh ]
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
2016-09-05 11:53:16 +01:00
Anthony PERARD ee4760b73d configure: do not depend on SEABIOS_PATH or OVMF_PATH ...
... to compile SeaBIOS and OVMF. Only depend on CONFIG_*.

If --with-system-* configure option is used, then set *_CONFIG=n to not
compile SEABIOS and OVMF.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2016-08-18 17:24:39 +01:00
Anthony PERARD 5ab49e44fa firmware/Makefile: install BIOS blob ...
... into the firmware directory, along with hvmloader.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2016-08-18 17:24:39 +01:00
Wei Liu ae79d11ec9 tools/firmware: fix OVMF clean and distclean
They should have used "-ovmf-dir" suffix instead of "-ovmf", as the
directory in question is ovmf-dir.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-03-11 16:54:03 +00:00
George Dunlap 1e491e5427 make: Add subtree-force-update target
subtree-force-update will update all subtrees according to the current TAG specified
in Config.mk.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2014-09-23 18:39:49 +01:00
George Dunlap 1ae93d3db8 make: Make *-dir-force-update depend on *-dir-find
Make the targets depend on the "-find" targets, so that if the
subtrees are cloned if they haven't been cloned already.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2014-07-18 11:20:56 +01:00
George Dunlap 8962a8f951 make: Normalize config options for external trees
We have four different external trees, and four different naming
conventions for specifying the URL, where they live, and what revision
to check out.

Normalize config options on the following bases:
 - QEMU_UPSTREAM
 - QEMU_TRADITIONAL
 - SEABIOS_UPSTREAM
 - OVMF_UPSTREAM

The following suffixes for all trees:
 - _URL : A remote repository to clone from
 - _REVISION : The revision to check out

And the following suffixes for the qemu trees:
 - _INTREE : The location of an inlined tree (for tarball releases)
 - _LOC : Where to actually look (either a directory or a URL)

The following parameters are still supported for backwards
compatibility:
 - CONFIG_QEMU          (=> QEMU_TRADITIONAL_LOC)
 - QEMU_REMOTE          (=> QEMU_TRADITIONAL_URL)
 - QEMU_TAG             (=> QEMU_TRADITIONAL_REVISION)
 - SEABIOS_UPSTREAM_TAG (=> SEABIOS_UPSTREAM_REVISION)

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2014-07-18 11:20:56 +01:00
Roger Pau Monne fbf92a840c build: export linker emulation parameter to SeaBIOS
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2014-06-18 17:21:40 +01:00
Ian Campbell 79e0f772a9 tools: Use SeaBIOS's defconfig
Compared with our local config this enables CONFIG_BOOTSPLASH and disables
CONFIG_ATA_DMA and CONFIG_ATA_PIO32.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Don Slutz <dslutz@verizon.com>
Tested-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2014-06-02 15:09:15 +01:00
Roger Pau Monne 88527ccfef build: export CC value to SeaBIOS
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2014-05-02 13:34:35 +01:00
Ian Campbell 6b2029c9a1 tools: support system supplied ovmf binary
Debian Jessie at least contains an ovmf package that includes
/usr/share/ovmf/OVMF.fd. It's also possible that user may want to supply
his/her own ovmf binary.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
2013-11-11 13:38:57 +00:00
Ian Campbell 871062d695 tools: clone ovmf to ovmf-dir directory
for consistency with other foo-dir e.g. qemu, seabios.

Remove obsolete ovmf-find target.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
2013-11-11 13:38:56 +00:00
Fabio Fantoni 906677d641 tools: allow user to specify a system seabios binary
If this option is given don't bother building seabios ourselves.
Likely to be handy for distros who have an existing seabios
package which they want to reuse.

Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-09-09 14:48:51 +01:00
Christoph Egger 57c15d9691 tools/firmware: pass PYTHON as an env var to sub-makes in this subtree
This fixes the Seabios build on platforms where just "python" is not
correct, which includes NetBSD.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2012-04-25 11:21:25 +01:00
Attilio Rao 62ed20c3f5 Fetch the OVMF repository from specific git mirror and enable it
Signed-off-by: Attilio Rao <attilio.rao@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
2012-03-22 10:26:03 +00:00
Ian Campbell 5ca9053cee tools: Add explicit clean rule for SeaBIOS
Since seabios-dir is cloned during build we need to check that it exists before
recursing into it for clean, following the pattern used for qemu-*-dir etc.

Also remove usage of "buildmakevars2shellvars" except when used to poopulate
the environment for qemu-xen-traditional's xen-setup script, which is the only
user.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2012-03-14 14:10:17 +00:00
Julian Pidancet 86b47ba3ee firmware: Introduce CONFIG_ROMBIOS and CONFIG_SEABIOS options
This patch introduces configuration options allowing to built either a
rombios only or a seabios only hvmloader.

Building option ROMs like vgabios or etherboot is only enabled for a
rombios hvmloader, since SeaBIOS takes care or extracting option ROMs
itself from the PCI devices (these option ROMs are provided by the
device model and do not need to be built in hvmloader).

The Makefile in tools/firmware/ now only checks for bcc if rombios is
enabled.

These two configuration options are left on by default to remain
compatible.

Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2012-02-13 12:50:46 +00:00
14ee3c05f3 Clone and build Seabios by default
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2012-01-24 15:09:31 +00:00
Ian Jackson dcbc297aea tools: Revert seabios and upstream qemu build changes
These have broken the build and it seems to be difficult to fix.  So
we will revert the whole lot for now, and await corrected patch(es).

Revert "fix the build when CONFIG_QEMU is specified by the user"
Revert "tools: fix permissions of git-checkout.sh"
Revert "scripts/git-checkout.sh: Is not bash specific. Invoke with /bin/sh."
Revert "Clone and build Seabios by default"
Revert "Clone and build upstream Qemu by default"
Revert "Rename ioemu-dir as qemu-xen-traditional-dir"
Revert "Move the ioemu-dir-find shell script to an external file"

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-09-14 11:38:13 +01:00
Stefano Stabellini cee3fd7bb8 Clone and build Seabios by default
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2011-09-13 10:30:09 +01:00
Keir Fraser 547cb1849c build: Make XEN_ROOT an absolute path.
Otherwise make can search the path relative to certain standard paths
such as /usr/include (e.g., the line '-include $(XEN_ROOT)/.config' in
Config.mk suffers from this).

Signed-off-by: Keir Fraser <keir@xen.org>
2011-03-17 10:36:25 +00:00
Keir Fraser bfb32dde4f tools: Update distclean target to remove auto-gen'ed tarballs.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-07-20 11:18:39 +01:00
Keir Fraser 98ed7531a4 gpxe: Build e1000 ROM with PCI-ID matching that advertised by qemu-dm.
Also build gpxe without -Werror and require it always to be built (do
not include a pre-built binary in our source repo).

Portions of this patch are from Gianni Tedesco <gianni.tedesco@citrix.com>

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-06-29 13:33:37 +01:00
Keir Fraser dcf18dfcc4 tools: don't require hardcoded firmware path in guest config file
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-06-23 11:23:27 +01:00
Keir Fraser ff7c1b9e4f build system cleanup - get rid of some hardcoded paths
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2009-03-19 14:01:56 +00:00
Keir Fraser 8bb7b3914b hvmloader: Make build fail if packages required to build hvmloader not present
Also, corrected the message generated by the makefile which says what
packages are required.

Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2009-03-02 10:30:15 +00:00
Keir Fraser bef2c17dbc Do not print `***' when compiling unless we fall over
This has finally bugged me enough to do something about it:

make prints `***' when it stops due to an error.  With make -j, and/or
with automated build systems, this error marker can be in the middle
of a large logfile.  It is useful to be able to search for it.

Therefore change occurrences of `*' to `=' for information and warning
messages.  `***' is reserved for cases where the build stops.

A corresponding change is being applied to qemu-xen-unstable.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2009-01-12 10:17:12 +00:00
Keir Fraser 3321e0ef95 hvm: Remove extboot from virtual firmware.
Device model is not present in external qemu repository, and
functionality was never exposed through the toolstack.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-29 15:45:38 +01:00
Keir Fraser c3e57fa148 tools/firmware: Use generic subdirs rules.
Signed-off-by: Bastian Blank <waldi@debian.org>
2008-03-25 09:51:03 +00:00
Keir Fraser 50b12df836 x86 vmx: Remove vmxassist.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-02-06 12:07:55 +00:00
Keir Fraser e1781903c7 Fix hvmloader makefile dependencies, and do not recurse into
tools/firmware/etherboot by default (the dependency of eb_roms.h on
Config does not seem to always prevent the build from going ahead, for
some reason).
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-02-02 13:40:43 +00:00
Ian Jackson 2d06b3f0df Build etherboot ROM from source.
We now include the source for Etherboot (5.4.2, obtained from git)
rather than a pre-built ROM.  This gives better traceability and GPL
licence compliance.  See tools/firmware/etherboot/README for details.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-01-30 18:39:04 +00:00
Keir Fraser 86f69d44ae hvm: Extboot support for Xen
This patch adds extboot to Xen.  It should be pretty harmless as the
moment because it's never enabled.  extboot allows arbitrary block
devices to be used to boot guests including SCSI and PV disks.  I've
tested it with both Windows and Linux guests in QEMU.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2008-01-17 16:39:14 +00:00
Keir Fraser 93943bf038 Fix build when bcc is not installed. 2007-03-16 23:33:44 +00:00