diff options
Diffstat (limited to 'descriptor-coreboot.pl')
-rwxr-xr-x | descriptor-coreboot.pl | 29 |
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); |