Commit Graph

42 Commits (61bc846d8c58535af6884b637a4005dd6111ea95)

Author SHA1 Message Date
Bin Meng 6c141fb7dd
riscv: roms: Update default bios for sifive_u machine
With the support of heterogeneous harts and PRCI model, it's now
possible to use the OpenSBI image (PLATFORM=sifive/fu540) built
for the real hardware.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
2019-09-17 08:42:49 -07:00
Bin Meng 02db1be1d0 riscv: roms: Fix make rules for building sifive_u bios
Currently the make rules are wrongly using qemu/virt opensbi image
for sifive_u machine. Correct it.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Chih-Min Chao <chihmin.chao@sifive.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 1564812484-20385-1-git-send-email-bmeng.cn@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-08-13 12:46:24 +01:00
Alistair Francis 91f3a2f0ce
roms: Add OpenSBI version 0.4
Add OpenSBI version 0.4 as a git submodule and as a prebult binary.

OpenSBI (https://github.com/riscv/opensbi) aims to provide an open-source
reference implementation of the RISC-V Supervisor Binary Interface (SBI)
specifications for platform-specific firmwares executing in M-mode. For all
supported platforms, OpenSBI provides several runtime firmware examples.
These example firmwares can be used to replace the legacy riscv-pk bootloader
and enable the use of well-known bootloaders such as U-Boot.

OpenSBI is distributed under the terms of the BSD 2-clause license
("Simplified BSD License" or "FreeBSD License", SPDX: BSD-2-Clause). OpenSBI
source code also contains code reused from other projects desribed here:
https://github.com/riscv/opensbi/blob/master/ThirdPartyNotices.md.

In this case all of the code we are using from OpenSBI is BSD 2-clause
as we aren't using the Kendryte code (Apache-2.0) with QEMU and libfdt
is dual licensed as BSD 2-clause (and GPL-2.0+). OpenSBI isn't being
linked with QEMU either it is just being included with QEMU.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
2019-07-18 14:18:43 -07:00
Philippe Mathieu-Daudé 60c85ec822 roms: List and describe the Makefile 'clean' rule
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190506141923.12183-3-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2019-05-22 15:40:08 +02:00
Philippe Mathieu-Daudé 652141e49e roms: Correct the EDK2_BASETOOLS_OPTFLAGS variable description
In commit 1cab464136 we incorrectly described the
EDK2_BASETOOLS_OPTFLAGS can pass CPPFLAGS and CFLAGS
options to the EDK2 build tools, but it only expands
the CFLAGS (not to the CPPFLAGS).
Update the description to be more accurate.

Reported-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190506141923.12183-2-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2019-05-22 15:38:42 +02:00
Laszlo Ersek 536d2173b2 roms: build edk2 firmware binaries and variable store templates
Add the "efi" target to "Makefile".

Introduce "Makefile.edk2" for building and cleaning the firmware images
and varstore templates.

Collect the common bits from the recipes in the helper script
"edk2-build.sh".

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Philippe Mathieu-Daud <philmd@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Philippe Mathieu-Daud <philmd@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
2019-04-17 15:38:35 +02:00
Laszlo Ersek ee5ef780de roms/Makefile: replace the $(EDK2_EFIROM) target with "edk2-basetools"
We don't (can't) have a recipe for building just $(EDK2_EFIROM);
therefore, while we call the target $(EDK2_EFIROM), we actually build all
of the edk2 BaseTools. Rename the target to edk2-basetools, and update the
iPXE prerequisite accordingly. This will let other targets depend on
"edk2-basetools", where an $(EDK2_EFIROM) pre-requisite would be
misleading.

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Philippe Mathieu-Daud <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daud <philmd@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
2019-04-17 15:38:35 +02:00
Philippe Mathieu-Daudé 1cab464136 roms: Allow passing configure options to the EDK2 build tools
Since commit f590a812c2 we build the EDK2 EfiRom utility
unconditionally.

Some distributions require to use extra compiler/linker flags,
i.e. SUSE which enforces the PIE protection (see [*]).

EDK2 build tools already provide a set of variables for that,
use them to allow the caller to easily inject compiler/linker
options..

Now build scripts can pass extra options, example:

  $ make -C roms \
      EDK2_BASETOOLS_OPTFLAGS='-fPIE' \
      efirom

[*] https://lists.opensuse.org/opensuse-factory/2017-06/msg00403.html

Reported-by: Olaf Hering <olaf@aepfle.de>
Suggested-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190409134536.15548-3-philmd@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-04-09 18:33:55 +02:00
Philippe Mathieu-Daudé d912e795e0 roms: Rename the EFIROM variable to avoid clashing with iPXE
The iPXE's 'veryclean' recipe removes $(EFIROM) even if the EFIROM
macro originates from elsewhere:

  $ git checkout f590a812c21~
  $ make -C roms clean EFIROM=$(type -P EfiRom)
  make: Entering directory '/source/qemu/roms'
  [...]
  make -C ipxe/src veryclean
  make[1]: Entering directory '/source/qemu/roms/ipxe/src'
  rm -f bin{,-*}/*.* bin{,-*}/.certificate.* bin{,-*}/.certificates.* bin{,-*}/.private_key.* bin{,-*}/errors bin{,-*}/NIC ./util/zbin ./util/elf2efi32 ./util/elf2efi64 /usr/bin/EfiRom ./util/efifatbin ./util/iccfix ./util/einfo TAGS bin{,-*}/symtab
  rm: cannot remove '/usr/bin/EfiRom': Permission denied
  make[1]: *** [Makefile.housekeeping:1564: clean] Error 1
  make[1]: Leaving directory '/source/qemu/roms/ipxe/src'
  make: *** [Makefile:152: clean] Error 2
  make: Leaving directory '/source/qemu/roms'

Before f590a812c2 this variable could be overridden or unset,
and the 'veryclean' Makefile rule would not complain.

Commit f590a812c2 enforces this variable to the Intel EfiRom
tool provided by the EDK2 project.

To avoid the name clash and make the difference between the
projects obvious, rename the variable used by the EDK2 project
as EDK2_EFIROM.

Fixes: f590a812c2
Reported-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190409134536.15548-2-philmd@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-04-09 18:33:45 +02:00
Laszlo Ersek f590a812c2 roms: build the EfiRom utility from the roms/edk2 submodule
Building the EfiRom utility from "roms/edk2/BaseTools" should make
"roms/Makefile" more self-contained. Otherwise, we'd call the system-wide
EfiRom for building the combined iPXE option ROMs, but call the sibling
utilities from "roms/edk2/BaseTools" for building "roms/edk2" content.

Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Cc: Shannon Zhao <shannon.zhaosl@gmail.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190204160325.4914-3-lersek@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2019-02-21 12:28:41 -05:00
Roman Bolshakov 78ac44af54 roms: seabios: Rename CROSS_COMPILE to CROSS_PREFIX
SeaBIOS introduced CROSS_PREFIX in 2013 but it's not set in roms
Makefile.

With the change it's possible to cross-compile SeaBIOS on macOS,
if acpica/iasl is installed:
  cd roms
  export PATH=/path/to/cross/x86_64-unknown-linux-gnu/bin:$PATH
  make bios system=unknown-linux-gnu

Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
Message-id: 20181121203720.75916-1-r.bolshakov@yadro.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-01-11 12:46:07 +01:00
Gerd Hoffmann af51dbed38 update seabios to 1.12
Seabios 1.12 has been released yesterday.  Update
our snapshot builds to the final release.

git shortlog
============

Kevin O'Connor (2):
      shadow: Rework bios copy code to prevent gcc array-bounds warning
      docs: Note v1.12.0 release

Shmuel Eiderman (1):
      pvscsi: Scan all 64 possible targets

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-11-20 06:57:53 +01:00
Gerd Hoffmann 91b8eba9ec vgabios: remove submodule and build rules.
It's the old, lgpl vgabios implementation.

Was left in as fallback when we switched to seavgabios, so we could
easily switch back in case we see regressions.  It's unused since years
now, reportedly doesn't even build, and lacks support for recently (and
not so recently) added display devices.

Zap it.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-07-02 17:20:54 +02:00
Gerd Hoffmann 75056cef41 seabios: add vga configs for bochs-display and ramfb
Both bochs-display and ramfb are devices with a simple framebuffer and
no vga emulation or text mode.  seavgabios has support for text mode
emulation (at vgabios call level), we are using that to provide some
vga compatibility support for these devices.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-07-02 17:20:54 +02:00
BALATON Zoltan b41a162c1b roms: Added git submodule for u-boot-sam460 (firmware for sam460ex)
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-03-06 13:16:29 +11:00
Cédric Le Goater bcad45de6a ppc: add skiboot firmware for the pnv platform
This is the initial image of skiboot 5.3.7 (commit 762d0082) for
the PowerPC PowerNV (Non-Virtualized) platform. Built from
submodule.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-10-28 09:36:58 +11:00
Gerd Hoffmann 4d9dc8b7a8 ipxe: add vmxnet3 rom
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2016-06-24 13:53:57 +02:00
Gerd Hoffmann c9c3dc5f4b ipxe: add e1000e rom
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2016-06-24 13:53:52 +02:00
Gerd Hoffmann bf864863f6 seabios: stop updating aml files
ACPI aml files traditionally have been managed in the seabios repo.
In qemu version 2.0 we've switched over to have qemu generate the
acpi tables and provide them to the firmware via fw_cfg.

The old aml files are still there and used for old machine types.
Well, actually the q35 file only, the piix4 version is compiled into
seabios (unless built with CONFIG_ACPI_DSDT=n) and is there for
reference only.

The aml files havn't been touched for a long time, and given that
new features requiring acpi changes are typically only added to new
machine types this is unlikely to change in the future.  So stop
updating them.

That allows to cleanup things a bit on the seabios side in the future.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2016-01-05 13:04:14 +01:00
Gerd Hoffmann 437b8d8c59 seabios: use new EXTRAVERSION to tag qemu builds
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2016-01-05 13:04:14 +01:00
Gerd Hoffmann cf2b4b5b77 ipxe: use upstream configuration
Upstream supports named configurations now and ships with
settings for qemu.  Use them, drop our config header copying.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-09-03 14:46:24 +02:00
Gerd Hoffmann f927f16213 ipxe: don't override GITVERSION
We had build problems due to the git version checking in the ipxe build
system in the past.  Don't remember the details, but the problem seems
to be gone now, so lets remove the workaround.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>

[ most likely ipxe commit 6153c09c41034250408f3596555fcaae715da46c:
  [build] Set GITVERSION only if there is a git repository ]

Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2015-09-03 14:46:24 +02:00
Gerd Hoffmann 7edf2f0ec4 tag our seabios builds
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-06-17 09:24:55 +02:00
Gerd Hoffmann 7a4dfd1e4a virtio-vga: add vgabios configuration
Add seavgabios configuration for virtio-vga,
hook up the new vgabios in the makefiles.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-06-12 10:13:23 +02:00
Alexander Graf 4e73c78192 PPC: Add u-boot firmware for e500
This adds a special build of u-boot tailored for the e500 platforms we
emulate. It is based on the current version of upstream u-boot which
contains all the code necessary to drive our QEMU provided machines.

Signed-off-by: Alexander Graf <agraf@suse.de>
2014-06-16 13:24:35 +02:00
Bruce Rogers 50df8d5db0 roms: remove explicit MAKEFLAGS from recursive make invocations
When using $(MAKE) within a makefile, we shouldn't be explicitly
including $(MAKEFLAGS) on the command-line. It causes problems
when that makefile is recursively invoked. When the roms/Makefile
is invoked as in make -C roms bios a spurious 'w' appears on the
sub-make invocation, due to the erroneous $(MAKEFLAGS) inclusion.

Signed-off-by: Bruce Rogers <brogers@suse.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-02-03 15:37:17 +01:00
Gerd Hoffmann 07403a5a03 roms: enable seabios cross builds
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-12-06 08:55:42 +01:00
Gerd Hoffmann 94e68caaa0 roms: build two seabios binaries
Adding xhci support to seabios made it jump over the 128k line.
Changing the bios size breaks migration, so we have to keep a
128k seabios binary for old machine types.  New machine types can
use a large 256k bios which should be big enougth for a while.

This patch updates the seabios build process to build seabios twice,
once full featured and once with xen and xhci turned off so the
resulting binary is small enougth to fit into 128k.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-12-06 08:55:42 +01:00
Gerd Hoffmann 774e80ea1d roms: add support for building sgabios
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-09-30 09:44:36 +02:00
Gerd Hoffmann 95f7c6803c roms: enable parallel seabios / seavgabios builds
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-09-30 09:44:35 +02:00
Gerd Hoffmann 779fa9d706 roms: enable ipxe cross builds 2013-09-30 09:44:35 +02:00
Gerd Hoffmann bcf06c15e7 roms: add rules to build slof
Add some logic to detect cross compilers.  Add support for "make slof",
which should JustWork[tm] if you are on a ppx64 machine or have a ppc64
cross compiler installed somewhere in your path.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-09-30 09:44:35 +02:00
Gerd Hoffmann 46ef7f33a2 roms: parallel ipxe builds
Enable parallel ipxe builds.  Reduce the recursive make calls.  Call
recursive make properly using $(MAKE) $(MAKEFLAGS).

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-09-30 09:44:35 +02:00
Gerd Hoffmann 5a7bd33385 roms: build lgplvgabios isavga variant
Add logic to also build+install the isavga vgabios variant.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-09-30 09:44:35 +02:00
Gerd Hoffmann 1ede4dd04b roms: enable parallel builds for 'make lgplvgabios'
Recurse into vgabios once, adjust dependencies, call make using
$(MAKE) $(MAKEFLAGS) so jobserver mode works.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-09-30 09:44:35 +02:00
Gerd Hoffmann 6887581728 roms: add 'make clean'
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-09-30 09:44:35 +02:00
Gerd Hoffmann 95ca557d5c ipxe: disable two second timeout
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-03-25 09:07:40 +01:00
Gerd Hoffmann 2f3f430d7c Add Makefile rules to build nic rom binaries with efi support
"make -C roms efirom" will build rom binaries with EFI support.
They are composed from three images: legacy bios, efi ia32
and efi x64.  So netbooting via SeaBIOS will continue to work
like it does today, and additionally we get network support
for EFI.  This target needs the EfiRom utility (shipped with
edk2) somewhere in the $PATH.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-03-18 10:21:56 +01:00
Gerd Hoffmann 2397edd735 Add Makefile rules to build nic rom binaries
"make -C roms pxerom" will build the ipxe roms and update
the binaries in pc-bios/, i.e. it basically documents how
the build process of our current nic roms works.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-03-18 10:21:56 +01:00
Gerd Hoffmann 7527bd85be roms: also copy the dsdt when updating seabios.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-30 16:24:40 +01:00
Gerd Hoffmann b456677607 Add vgabios build rules to roms/Makefile
This patch adds some glue to roms/Makefile to build vgabios binaries for
qemu.  It covers both the lgpl'ed vgabios implementation used by qemu
traditionally and the new seabios implementation.

The purpose of this patch is to (a) document the vgabios build process
and (b) simplify seavgabios testing for those who want to play with it.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-07-12 15:25:54 +02:00
Gerd Hoffmann b1c0d031c4 Add seabios build scripts to roms/
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-03-12 13:56:58 +01:00