summaryrefslogtreecommitdiffstats
path: root/descriptor-coreboot.pl
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 /descriptor-coreboot.pl
parent56d7bc4fadd7bfb4e0fadae59e484e3496d32199 (diff)
downloadcoreboot-fdd57fc65d185170ba73e411a51fa06259d3f7c7.tar.gz
add firmware descriptor files
Diffstat (limited to 'descriptor-coreboot.pl')
-rwxr-xr-xdescriptor-coreboot.pl29
1 files changed, 29 insertions, 0 deletions
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);