summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2019-06-20 10:48:04 +0200
committerGerd Hoffmann <kraxel@redhat.com>2019-06-20 10:48:04 +0200
commitfdd57fc65d185170ba73e411a51fa06259d3f7c7 (patch)
tree1899853612fbb22ae19532db2645a961197d25b0
parent56d7bc4fadd7bfb4e0fadae59e484e3496d32199 (diff)
downloadcoreboot-fdd57fc65d185170ba73e411a51fa06259d3f7c7.tar.gz
add firmware descriptor files
-rw-r--r--coreboot.git.spec19
-rwxr-xr-xdescriptor-coreboot.pl29
2 files changed, 45 insertions, 3 deletions
diff --git a/coreboot.git.spec b/coreboot.git.spec
index c26f1e3..02690a4 100644
--- a/coreboot.git.spec
+++ b/coreboot.git.spec
@@ -9,6 +9,7 @@ Group: Applications/Emulators
License: GPLv2+
Source0: coreboot.git-g0cc33da.tar.xz
#Source1: 3rdparty-vboot-gfbf631c.tar.gz
+Source9: descriptor-coreboot.pl
Source10: config.i440fx.seabios
Source11: config.i440fx.seabios.corevga
@@ -17,7 +18,8 @@ Source20: config.q35.seabios
Source22: config.q35.tianocore
BuildRequires: iasl
-BuildRequires: python
+BuildRequires: make gcc python
+BuildRequires: perl perl-JSON
BuildRequires: pciutils-devel
BuildRequires: seabios.git-coreboot
#BuildRequires: edk2.git-coreboot-x64
@@ -53,13 +55,15 @@ mkdir rpm.doc
mkdir rpm.bin
# use newer gcc on rhel, log used version
-if test -f /opt/rh/devtoolset-6/enable; then
+if test -f /opt/rh/devtoolset-8/enable; then
+ source /opt/rh/devtoolset-8/enable
+elif test -f /opt/rh/devtoolset-6/enable; then
source /opt/rh/devtoolset-6/enable
fi
gcc --version
do_build %{SOURCE10} coreboot-i440fx-seabios
-do_build %{SOURCE11} coreboot-i440fx-seabios-corevga
+#do_build %{SOURCE11} coreboot-i440fx-seabios-corevga
#do_build %{SOURCE12} coreboot-i440fx-tianocore
do_build %{SOURCE20} coreboot-q35-seabios
#do_build %{SOURCE22} coreboot-q35-tianocore
@@ -85,9 +89,18 @@ cp build/cbfstool \
cp util/inteltool/inteltool.8 \
%{buildroot}%{_mandir}/man8
+mkdir -p %{buildroot}/usr/share/qemu/firmware
+%{SOURCE9} "/usr/share/%{name}/coreboot-i440fx-seabios.rom" \
+ "coreboot (git master, i440fx, seabios)" "i440fx" \
+ > %{buildroot}/usr/share/qemu/firmware/90-coreboot-git-i440fx-seabios.json
+%{SOURCE9} "/usr/share/%{name}/coreboot-q35-seabios.rom" \
+ "coreboot (git master, q35, seabios)" "q35" \
+ > %{buildroot}/usr/share/qemu/firmware/90-coreboot-git-q35-seabios.json
+
%files
%doc rpm.doc/*.config
/usr/share/%{name}
+/usr/share/qemu/firmware/*
%files tools
%{_bindir}/*
diff --git a/descriptor-coreboot.pl b/descriptor-coreboot.pl
new file mode 100755
index 0000000..ade6044
--- /dev/null
+++ b/descriptor-coreboot.pl
@@ -0,0 +1,29 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+use JSON;
+
+my $desc = shift;
+my $file = shift;
+my $mach = shift;
+die "arguments missing" unless defined($desc) and defined($file) and defined($mach);
+
+my $json = JSON->new->allow_nonref;
+my $info;
+my $x86;
+my $x64;
+
+$x86->{'architecture'} = 'i386';
+$x86->{'machines'} = [ "pc-${mach}-*" ];
+$x64->{'architecture'} = 'x86_64';
+$x64->{'machines'} = [ "pc-${mach}-*" ];
+
+$info->{'description'} = $desc;
+$info->{'interface-types'} = [ 'bios' ];
+$info->{'mapping'}->{'device'} = 'memory';
+$info->{'mapping'}->{'filename'} = $file;
+$info->{'targets'} = [ $x86, $x64 ];
+$info->{'features'} = [ 'acpi-s3', 'acpi-s4' ];
+$info->{'tags'} = [ 'git master autobuild' ];
+
+print $json->pretty->encode($info);