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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Enable parallel ipxe builds. Reduce the recursive make calls. Call
recursive make properly using $(MAKE) $(MAKEFLAGS).
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Recurse into vgabios once, adjust dependencies, call make using
$(MAKE) $(MAKEFLAGS) so jobserver mode works.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
"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>
"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>
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>